[MPlayer-dev-eng] [MPlayer-cvslog] [PATCH] GCC: Do not warn about unused paramters (was Re: r36944 - in trunk/gui/win
Ingo Brückl
ib at wupperonline.de
Wed Feb 26 16:05:54 CET 2014
Alexander Strasser wrote on Wed, 26 Feb 2014 15:22:33 +0100:
> BTW @ all:
> Why don't we have -Wno-unused-parameter in CFLAGS?
> I can hardly even think of a case where an unused parameter warning
> would be relevant. Also I cannot remember a single occasion where it
> mattered in practice.
An unused variable (besides one in a callback function that has a fixed
parameter list) is either a leftover or bad programming style (IMO).
I want to be informed about any junk lying around.
And for the mentioned callback functions something like mp_unused() would
indicate that not all of the parameters are relevant in this particular case
(while allowing the usage of -Wunused-parameter).
> Adding the above mentioned flag eliminates 2000+ unused parameter
> warnings here if I did not mess up my measurements.
> Patch attached.
No surprise, I object.
Ingo
More information about the MPlayer-dev-eng
mailing list