[MPlayer-cvslog] r36944 - in trunk/gui/win32: interface.c playlist.c playlist.h

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Feb 25 23:23:04 CET 2014

On 25.02.2014, at 23:14, Ingo Brückl <ib at wupperonline.de> wrote:
> Reimar Döffinger wrote on Tue, 25 Feb 2014 22:44:55 +0100:
>> On 25.02.2014, at 22:29, Ingo Brückl <ib at wupperonline.de> wrote:
>>> Reimar Döffinger wrote on Tue, 25 Feb 2014 20:43:51 +0100:
>>>> On Tue, Feb 25, 2014 at 07:39:10PM +0100, Ingo Brückl wrote:
>>>>> Reimar Döffinger wrote on Tue, 25 Feb 2014 19:01:27 +0100:
>>>>>>> @@ -501,6 +501,8 @@ static unsigned __stdcall GuiThread(void
>>>>>>> {
>>>>>>>    MSG msg;
>>>>>>> +    (void) param;
>>>>>> This is a bit ugly and might not work in all compilers.
>>>>> I'd say it'll work on most (all?) compilers. Yes, it's ugly.
>>>>>> I think using av_unused on the parameter would be nicer,
>>>>> I don't mind using it, but it would be nice if gcc would warn if such a
>>>>> parameter *will* be used later. (This is the only thing I dislike about the
>>>>> (void) solution. It'll look strange if you forget to remove it later. With
>>>>> av_unused it'll even look stranger.)
>>>> I don't think gcc warns, in part because it is sometimes used for
>>>> variables that will only be used under some #ifdef.
>>>> But I never actually checked...
>>> Do we have a chance to change the definition of av_unused to something like
>>> #define av_unused(v) __attribute__((unused)) v##_unused
>>> or should we define a mp_unused like this?
>> Couldn't you just rename the variable itself when you add the av_unused?
>> Doesn't seem to me like there's that much benefit in having it hidden in
>> a macro.
> The idea behind it is to only add or remove a mp_unused() without changing
> any identifiers (and to automatically disable the usage of those marked
> mp_unused()).

My point is: what is the big advantage of a diff from
int somevar;
int mp_unused(somevar);
instead of
int av_unused somevar_unused;

Btw. I think for gcc and function arguments at least you can just remove (or comment out) the name from the declaration to get the same effect.

>> But if you think it's useful feel free to add such a macro.
> Would you like me to replace the existing av_unused in the MPlayer sources?

Hm. I'd have to look at them. I suspect in some av_unused it means "might be unused", not "will always be unused", so such a change would break some configurations.

More information about the MPlayer-cvslog mailing list