Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2013-11-12 02:39:02 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-11-12 02:39:02 +0400
commit77a596365854482a3233335f450148e8e375cd94 (patch)
tree1cec6781b9ed5944824979e9f5d8ddaacf6e6e6c /celt/quant_bands.c
parentf6066df2b9f8231ba3d5df27962e05cb658aac1f (diff)
gcc -pedantic had "comparison of unsigned expression < 0 is always false"
Diffstat (limited to 'celt/quant_bands.c')
-rw-r--r--celt/quant_bands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/celt/quant_bands.c b/celt/quant_bands.c
index 52d6e0bb..ac6952c2 100644
--- a/celt/quant_bands.c
+++ b/celt/quant_bands.c
@@ -323,7 +323,9 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
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);