This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]