Suppress some coverity false positives.
authorGregory Maxwell <greg@xiph.org>
Thu, 17 Apr 2014 01:29:26 +0000 (18:29 -0700)
committerGregory Maxwell <greg@xiph.org>
Thu, 17 Apr 2014 01:29:26 +0000 (18:29 -0700)
celt/celt_encoder.c
celt/kiss_fft.c

index 9423903..7387ad5 100644 (file)
@@ -1644,6 +1644,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
             diff += MULT16_16(mask, 1+2*i-mask_end);
          }
       }
+      celt_assert(count>0);
       mask_avg = DIV32_16(mask_avg,count);
       mask_avg += QCONST16(.2f, DB_SHIFT);
       diff = diff*6/(C*(mask_end-1)*(mask_end+1)*mask_end);
index e7e1130..0bf058c 100644 (file)
@@ -457,7 +457,7 @@ kiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem,  co
         {
            st->twiddles = base->twiddles;
            st->shift = 0;
-           while (nfft<<st->shift != base->nfft && st->shift < 32)
+           while (st->shift < 32 && nfft<<st->shift != base->nfft)
               st->shift++;
            if (st->shift>=32)
               goto fail;