Hello!
Can anyone tell me please how I can disable "unused parameter" compiler warnings?
Thank
Cruz
Hello!
Can anyone tell me please how I can disable "unused parameter" compiler warnings?
Thank
Cruz
Check out the Q_UNUSED macro.
Thanks, but it's not what I'm looking for. With the Q_UNUSED macro I have to manually specify every single unused parameter and that would be very tiresome. Isn't there a simple way, say in the .pro file, to disable all unused parameter warnings?
Sure, you need to modify the gcc parameters: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Typically however, you want those warnings, so you use the Q_UNUSED macro to state which are actually unused.
Cruz (20th August 2010)
To save some research time for the next guy who would ask the same question, put this in your .pro file:
QMAKE_CXXFLAGS_WARN_OFF -= -Wunused-parameter
Anton (13th December 2013)
Bookmarks