[FFmpeg-devel] [PATCH] fix warning in vc1dec.c
Sun Feb 21 17:41:04 CET 2010
On Sun, Feb 21, 2010 at 04:13:19PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > On Sun, Feb 21, 2010 at 04:55:56PM +0100, Reimar D?ffinger wrote:
> >> On Sun, Feb 21, 2010 at 04:53:50PM +0100, Janne Grunau wrote:
> >> > Hi,
> >> >
> >> > fixes following warning
> >> > libavcodec/vc1dec.c: In function 'vc1_decode_p_mb':
> >> > libavcodec/vc1dec.c:2319: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
> >> >
> >> >
> >> > diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> >> > index 611b845..f607949 100644
> >> > --- a/libavcodec/vc1dec.c
> >> > +++ b/libavcodec/vc1dec.c
> >> > @@ -2316,7 +2316,7 @@ static int vc1_decode_p_mb(VC1Context *v)
> >> > }
> >> > if(i == 4) vc1_mc_4mv_chroma(v);
> >> > v->mb_type[s->block_index[i]] = is_intra[i];
> >> > - if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
> >> > + if(!coded_inter) coded_inter = !is_intra[i] && is_coded[i];
> >> There are concerns this will result in slower code.
> >> Unless we can get a decision, I'd suggest just adding a () to silence the compiler.
> > can we pipe the compiler output through egrep -v ?
> > or can this one be disabled by a compiler switch without disabling other
> > usefull warnings?
> There is -Wno-parentheses. However, that also disables a few
> moderately useful warnings (e.g. assignment as truth value). I
> personally don't much mind if we lose those. Your call.
I guess iam slightly in favor of disabling this class of warnings
and rather add "assignment as truth value" to patcheck if it doesnt
check for this already. That is if you are against my egrep idea
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel