[MPlayer-dev-eng] [MPlayer-cvslog] [PATCH] GCC: Do not warn about unused paramters (was Re: r36

Ingo Brückl ib at wupperonline.de
Thu Feb 27 00:21:55 CET 2014


Reimar Döffinger wrote on Wed, 26 Feb 2014 19:15:52 +0100:

> On Wed, Feb 26, 2014 at 04:05:54PM +0100, Ingo Brückl wrote:
>> 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).

> I think you never commented on my suggestion to just remove or comment
> out the argument in that case.

I'm not sure about other compilers being able to handle this (unlike the
(void) solution).

As mentioned, I don't want to go without the -Wunused-parameter. The most
universal method of supressing the warning seems to be the (void) solution,
while av_unused only works for gcc, so it is not much of an advantage. The
only advantage would be something like mp_unused() that automatically informs
in case the variable *will* be used (without having to remember to change
anything else).

Actually I don't intend to urge defining mp_unused(). I'm fine with (void) or
would be with a g_unused() for the GUI code only. It's just that (only I?)
see an advantage in it over something that says "unused" even if it's used.

Ingo


More information about the MPlayer-dev-eng mailing list