any way to disable a single *instance* of a GCC warning?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have quite some of these during my compile:

imfile.c: In function 'runInput':
imfile.c:298: warning: suggest braces around empty body in 'do' statement

They are a result of the pthreads library (pthread_cleanup_pop(0)). So
I can not simply "fix" this issue. There are similar issues with other
libraries.

I know that I can turn off these warning via options, but with that I
turn them off for all of my source. But I would like to retain that
warning for my code, so that it helps my find places where I screwed
up.

I wonder if there is any way to disable a warning for the next line. I
have seen that some compilers do this via a #pragma, but I have not
found any such pragma in GCC.

So: is there a way to suppress a single instance of a known warning?

Any feedback is deeply appreciated.

Thanks,
Rainer

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux