Cannot Suppress Specific Clan Warning on Mac OS X

I set the compiler flag -Wno-unused-parameter (and some others) and it is really passed to the compiler, but I still get this warning:

clang++ -c -pipe -Wno-self-assign -Wno-unused-parameter -Wno-unused-variable -g -gdwarf-2 -arch x86_64 -fPIC -Wall -W F/Library/Frameworks -o ../build/cobject.o src/cobject.cpp                                                     ^
src/cobject.cpp:102:68: warning: unused parameter 'client' [-Wunused-parameter]
void cobject::processNetMsg( int type, CNetMsg& msg, CClient& client )
                                                                   ^

Is it because it is also indicated -Wall? Should I -Wno-...have priority? How to tell clang to display all warnings except some?

+5
source share
1 answer

Warning arguments act like switches. When you do this, for example. -Wno-unused-parameteryou turn off this warning, however later on at the command prompt you run -Wallthat will turn it on again. The order of the arguments matters.

, , .

+9

All Articles