]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Intel C compiler warns on this assignment in this if(), probably
authorgpoirier <gpoirier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 2 Oct 2008 19:20:11 +0000 (19:20 +0000)
committergpoirier <gpoirier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 2 Oct 2008 19:20:11 +0000 (19:20 +0000)
because it's being assigned as a constant. To avoid a spurious warning,
split it into two instructions, which should also make it more logical
once the FIXME is resolved.
patch by Diego 'Flameeyes' Pettenò %flameeyes A gmail P com%

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15525 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/wmaenc.c

index 4558947cb3522f05a3610c7f3fec3c5390d16d0e..195c2702c6ee4859f349d544ab893958d99216df 100644 (file)
@@ -178,7 +178,8 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
     }
 
     for(ch = 0; ch < s->nb_channels; ch++) {
-        if ((s->channel_coded[ch]= 1)) { //FIXME only set channel_coded when needed, instead of always
+        s->channel_coded[ch] = 1; //FIXME only set channel_coded when needed, instead of always
+        if (s->channel_coded[ch]) {
             init_exp(s, ch, fixed_exp);
         }
     }