[FFmpeg-devel] [PATCH] silence wmaenc.c:181: warning: suggest parentheses around assignment used as truth value
Måns Rullgård
mans
Fri Feb 15 15:55:52 CET 2008
Benjamin Larsson wrote:
> $topic
>
> MvH
> Benjamin Larsson
>
>
> Index: libavcodec/wmaenc.c
> ===================================================================
> --- libavcodec/wmaenc.c (revision 11936)
> +++ libavcodec/wmaenc.c (working copy)
> @@ -178,7 +178,7 @@
> }
>
> for(ch = 0; ch < s->nb_channels; ch++) {
> - if (s->channel_coded[ch]= 1) { //FIXME only set channel_coded
> when needed, instead of always
> + if ((s->channel_coded[ch]= 1)) { //FIXME only set channel_coded
> when needed, instead of always
> init_exp(s, ch, fixed_exp);
> }
> }
WTF? Short of doing what the FIXME suggests, I see two sane options here:
1. Drop the if() entirely.
2. Separate the assignment from the if().
The current form just looks weird.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list