[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failure to build due to ignoring fwrite() result
From: |
Jim Meyering |
Subject: |
Re: failure to build due to ignoring fwrite() result |
Date: |
Mon, 30 Aug 2010 18:26:50 +0200 |
Bruce Korb wrote:
> 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.:)
Hi Bruce,
I don't like the length of "ignore_value" either, but think of that
as a feature, not a problem. It's more of an auto-regulator: If I'm
ignoring so many "important" return values that the "ignore_value"
uses impair readability, then I take that as an indication that I'm
doing something wrong.
- Re: failure to build due to ignoring fwrite() result, Bruce Korb, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Eric Blake, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Bruce Korb, 2010/08/30
- Re: failure to build due to ignoring fwrite() result,
Jim Meyering <=
- Re: failure to build due to ignoring fwrite() result, Bruce Korb, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Jim Meyering, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Bruce Korb, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Jim Meyering, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Eric Blake, 2010/08/30
- Re: failure to build due to ignoring fwrite() result, Jim Meyering, 2010/08/30
Re: failure to build due to ignoring fwrite() result, Paul Eggert, 2010/08/30