Bruce Korb wrote: > Hi Eric, > On Mon, Aug 30, 2010 at 8:27 AM, Eric Blake <[email protected]> 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.
