diff options
author | Gregory Maxwell <greg@xiph.org> | 2011-10-03 21:07:39 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-03 21:38:21 -0400 |
commit | 5d5875a93a5c15566c6dfbadf7180858705af517 (patch) | |
tree | 8f6c8a9f4d430a5291d8efc38e2c395cb8f65d5f /celt/quant_bands.c | |
parent | 4a7c9859cbea913e2d024d523cc10f2bd955d540 (diff) | |
download | libopus-5d5875a93a5c15566c6dfbadf7180858705af517.tar.gz |
Add the noreturn attribute on the assert functions to aid static analysis, improve test_repacketizer error handling, and silence 19 clang static analysis errors with additional assertions.
Diffstat (limited to 'celt/quant_bands.c')
-rw-r--r-- | celt/quant_bands.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/quant_bands.c b/celt/quant_bands.c index 9927a189..638cd11a 100644 --- a/celt/quant_bands.c +++ b/celt/quant_bands.c @@ -450,6 +450,10 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol int qi; opus_val32 q; opus_val32 tmp; + /* It would be better to express this invariant as a + test on C at function entry, but that isn't enough + to make the static analyzer happy. */ + celt_assert(c<2); tell = ec_tell(dec); if(budget-tell>=15) { |