bug-gnulib
[Top][All Lists]
Advanced

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

Re: failure to build due to ignoring fwrite() result


From: Bruce Korb
Subject: Re: failure to build due to ignoring fwrite() result
Date: Mon, 30 Aug 2010 09:06:22 -0700

Hi Eric,

On Mon, Aug 30, 2010 at 8:27 AM, Eric Blake <address@hidden> wrote:
>>    (void)fwrite(...)
>
> Gnulib has the ignore-value module for places where casting to void is
> insufficient to shut up gcc.

Many things are done in the interest of saving a few keystrokes.
In this case, this:
   ignore_value(fwrite(buffer, size, count, fileptr));
when used a lot yields a lot of visual clutter.
Clutter gets in the way of readability, which is important to me.
It's a matter of getting used to seeing the "x" or "y" prefix.
I'd have suggested "v for void", but it would be confusingly similar
to "v for var arg", so 'y' follows 'x' instead. :)

So, to be explicit:  add xWHATEVER variants for everything not already
covered, and yWHATEVER where one might reasonably want to not care.
("yfopen" would likely not be included.:)



reply via email to

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