[MPlayer-dev-eng] squelch some warnings (patches incl.)
Diego Biurrun
diego at biurrun.de
Mon Feb 25 00:11:41 CET 2008
On Sun, Feb 24, 2008 at 08:25:33PM +0100, Elias Pipping wrote:
>
> On a sidenote (replying here because Michael Niedermayer did not cc me):
>
> libavcodec/snow.c basically looks like this:
>
> #define QUANTIZE2 0
> #if QUANTIZE2==1
> static void dwt_quantize(<args>){
> <implementation>
> }
> #endif
>
> if(QUANTIZE2)
> dwt_quantize(<args>);
>
> The `#if QUANTIZE2==1` is effectively a `#if 0`. Hence, dwt_quantize()
> is never declared. I don't see a reason to check for QUANTIZE2 at
> runtime when it's already clear at compile-time that dwt_quantize() will
> never be called. The fact that the definition of dwt_quantize() is
> removed by the preprocessor but the invocation stays in, is what causes
> the warning and my patch fixes that. Please let me know what made you
> reject it.
I have to agree with Elias here. The fix is not uglier than the
original code...
Diego
More information about the MPlayer-dev-eng
mailing list