[MPlayer-dev-eng] [PATCH] mp_unused()
Alexander Strasser
eclipse7 at gmx.net
Wed Feb 26 18:57:01 CET 2014
On 2014-02-26 17:54 +0100, Ingo Brückl wrote:
> See discussion "[MPlayer-cvslog] r36944".
>
> Ingo
> Index: mp_global.h
> ===================================================================
> --- mp_global.h (revision 36945)
> +++ mp_global.h (working copy)
> @@ -26,4 +26,11 @@
> //FIXME this should be in a common header, but i dunno which
> #define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
>
> +#if defined(__GNUC__)
> +/// Disable warnings about unused functions, parameters or variables.
> +#define mp_unused(name) __attribute__((unused)) name##_unused
> +#else
> +#define mp_unused(name) name
> +#endif
Shouldn't it then be renamed in the else case too.
> +
> #endif /* MPLAYER_MP_GLOBAL_H */
I am not really a fan of variable renaming in macros, especially in
this case as it wont work on all kinds of function parameters.
I too dislike having our own mp_unused that behaves differently than
av_unused from lavu.
I also do not think this is needed at all or even worth it.
Having said that, I do not mind if you like to have it or if you
want it for the GUI. So if others are in favor I will not object.
Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140226/37a9432c/attachment.asc>
More information about the MPlayer-dev-eng
mailing list