Search code examples
c++g++compiler-warningsopenni

Disable warnings for specific included files


I am using OpenNI on OS X, and for some reason its .h files are spitting out a lot of warnings all over the place, which is annoying.

Is there a way to turn off all warnings for the OpenNI include files?


Solution

  • I found out that I can specify the include directories for OpenNI using the -isystem switch instead of -I.

    -isystem makes gcc treat the include directories as system directories, and as such it won't generate any warnings for them.