aboutsummaryrefslogtreecommitdiff
path: root/celt/quant_bands.c
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2011-10-03 21:07:39 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-10-03 21:38:21 -0400
commit5d5875a93a5c15566c6dfbadf7180858705af517 (patch)
tree8f6c8a9f4d430a5291d8efc38e2c395cb8f65d5f /celt/quant_bands.c
parent4a7c9859cbea913e2d024d523cc10f2bd955d540 (diff)
downloadlibopus-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.c4
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)
{