ref: 77a596365854482a3233335f450148e8e375cd94
parent: f6066df2b9f8231ba3d5df27962e05cb658aac1f
author: Jean-Marc Valin <[email protected]>
date: Mon Nov 11 12:39:02 EST 2013
gcc -pedantic had "comparison of unsigned expression < 0 is always false"
--- a/celt/quant_bands.c
+++ b/celt/quant_bands.c
@@ -323,7 +323,9 @@
nstart_bytes = ec_range_bytes(&enc_start_state);
nintra_bytes = ec_range_bytes(&enc_intra_state);
intra_buf = ec_get_buffer(&enc_intra_state) + nstart_bytes;
- save_bytes = IMAX(ALLOC_NONE, nintra_bytes-nstart_bytes);
+ save_bytes = nintra_bytes-nstart_bytes;
+ if (save_bytes == 0)
+ save_bytes = ALLOC_NONE;
ALLOC(intra_bits, save_bytes, unsigned char);
/* Copy bits from intra bit-stream */
OPUS_COPY(intra_bits, intra_buf, nintra_bytes - nstart_bytes);