QMAKE_CXX flag setting ignored?
Unsolved
General and Desktop
-
i have BOTH of these in my .pro file:
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-but-set-variable QMAKE_CXXFLAGS_WARN_OFF -= -Wunused-but-set-variable
and yet i still get this:
<file path>: warning: variable 'i' set but not used [-Wunused-but-set-variable]
why can i not suppress that warning?
-
@davecotter
You might start by looking at the full command line being issued for the compiler to see what flags in what order are being passed. -
oh, wow, i see i already posted this question, and got some hints, but i guess it didn't work, then i forgot about it.
-
Also you could simply use
Q_UNUSED
/[[maybe_unused]]
in-code to suppress it, instead of disabling it at the compiler level.