Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Unused parameters warning in QtCreator

I added this to my .pro file but I stil get warnings :

QMAKE_CXXFLAGS_WARN_OFF = -Wunused-parameter
like image 462
Youssef Bouhjira Avatar asked Mar 02 '14 15:03

Youssef Bouhjira


1 Answers

Use QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter,
because the flags in QMAKE_CXX_FLAGS will always before QMAKE_CXXFLAGS_WARN_ON, and QMAKE_CXXFLAGS_WARN_ON contains the flag -Wall. This means your flag will be overwrite by flag -Wall.

like image 146
LanhaiYou Avatar answered Oct 20 '22 00:10

LanhaiYou