bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64540: [PATCH] od: exit out on failure to write to stdout


From: Pádraig Brady
Subject: bug#64540: [PATCH] od: exit out on failure to write to stdout
Date: Mon, 17 Jul 2023 18:12:34 +0100
User-agent: Mozilla Thunderbird

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]