views:

678

answers:

3

It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten me. TIA.

+6  A: 

It is the -Wno-unused-value option, see the documentation

Florian Bösch
That made it, thank you! To be literal it's Wno-unused-value though.
phjr
A: 

Have you tried using a diagnostic pragma directive? These are available in gcc 4.2.1+, I believe.

Tyler
That would have the same effect, but I can't edit the files. Thanks anyway, I may need that later.
phjr
+5  A: 

If you use -fdiagnostics-show-option, GCC will tell you how to disable a warning (if possible).

JesperE
Wow, yet another thing I didn't know. Thanks!
phjr