我已经设置了 -Wno-unused-parameter (和其他一些)编译器标志,它确实被传递给编译器,但我仍然收到这个警告:
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 )
^
是因为-Wall
也指定了吗?不-Wno-...
应该优先吗?如何告诉 clang 显示除某些警告之外的所有警告?