GNU bug report logs - #64540
[PATCH] od: exit out on failure to write to stdout

Previous Next

Package: coreutils;

Reported by: Josef Bacik <josef <at> toxicpanda.com>

Date: Sun, 9 Jul 2023 09:09:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Bernhard Voelker <mail <at> bernhard-voelker.de>, Josef Bacik <josef <at> toxicpanda.com>, 64540-done <at> debbugs.gnu.org
Subject: bug#64540: [PATCH] od: exit out on failure to write to stdout
Date: Mon, 17 Jul 2023 18:12:34 +0100
On 17/07/2023 18:04, Paul Eggert wrote:
> On 2023-07-17 03:31, Pádraig Brady wrote:
>> static inline void
> 
> As a general rule, there's no need for 'static inline' in C, as nowadays
> compilers figure out inlining just fine for static functions and plain
> 'static' should be good enough. There are exceptions but 'write_error'
> doesn't look like it's one of them.

Right. In headers though, the traditional "static inline" idiom
indicates to the compiler that this function is a small
utility function that may not be used in all translation units
that the header is included in.  I.e. without the inline,
in some translation units you'd get:

  error: 'write_error' defined but not used [-Werror=unused-function]

cheers,
Pádraig.




This bug report was last modified 1 year and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.