Avoiding arithmetic on NULL pointer v1.3-rc
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 29 May 2018 04:35:02 +0000 (00:35 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 29 May 2018 04:35:02 +0000 (00:35 -0400)
Causes a warning with -Wnull-pointer-arithmetic and the code wasn't doing
anything anyway (the ctl call ignores NULLs)

src/opus_encoder.c

index bdbedec..1c5a8b3 100644 (file)
@@ -2036,8 +2036,6 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
        info.signalType = st->silk_mode.signalType;
        info.offset = st->silk_mode.offset;
        celt_encoder_ctl(celt_enc, CELT_SET_SILK_INFO(&info));
-    } else {
-       celt_encoder_ctl(celt_enc, CELT_SET_SILK_INFO((SILKInfo*)NULL));
     }
 
     /* 5 ms redundant frame for CELT->SILK */