This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 19:16:15 +0000
- Subject: [Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- Auto-submitted: auto-generated
- References: <bug-61081-4 at http dot gcc dot gnu dot org/bugzilla/>
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.