[Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 25 19:16:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Peter Eisentraut from comment #2)
> No, these "functions" need to have a usable return value, because someone
> could write
> 
> if (!sigemptyset(...))
>     weirderror();

Note that just using:

(void) sigemptyset();

silences the warning in those cases where you want to ignore the return value,
which could be useful while someone comes up with a patch for a more permanent
fix.

Or you can use -Wno-unused-value for now.


More information about the Gcc-bugs mailing list