Pádraig Brady wrote: > Jim Meyering wrote: >> Hmm... I guess you could be thinking about >> warnings from non-gcc compilers. Yes, that's another way in which >> (void)i is better. > > Right. > > BTW, I'm annoyed that one can't always do: (void) function(); > but I presume gcc must have a _very_ good reason for that.
It's listed as a gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579 However, I appreciate the fact that this option ignores (void) casts. There has been so much abuse of (void) used to ignore WUR-marked function return values that this warning tends to uncover many real bugs. The true exceptions are rare enough that I don't mind adding explicit ignore_value uses. > Looks good, thanks for cleaning it up. Pushed.