diff options
-rw-r--r-- | apps/codecs/libmad/decoder.c | 7 | ||||
-rw-r--r-- | apps/codecs/libmad/frame.c | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/huffman.c | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/layer3.c | 6 |
4 files changed, 14 insertions, 7 deletions
diff --git a/apps/codecs/libmad/decoder.c b/apps/codecs/libmad/decoder.c index efa95e31c8..f484e36569 100644 --- a/apps/codecs/libmad/decoder.c +++ b/apps/codecs/libmad/decoder.c | |||
@@ -119,6 +119,9 @@ int mad_decoder_finish(struct mad_decoder *decoder) | |||
119 | 119 | ||
120 | return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0; | 120 | return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0; |
121 | } | 121 | } |
122 | # else | ||
123 | /* Avoid compiler warning */ | ||
124 | (void)decoder; | ||
122 | # endif | 125 | # endif |
123 | 126 | ||
124 | return 0; | 127 | return 0; |
@@ -577,6 +580,10 @@ int mad_decoder_message(struct mad_decoder *decoder, | |||
577 | 580 | ||
578 | return 0; | 581 | return 0; |
579 | # else | 582 | # else |
583 | /* Avoid compiler warnings */ | ||
584 | (void)decoder; | ||
585 | (void)message; | ||
586 | (void)len; | ||
580 | return -1; | 587 | return -1; |
581 | # endif | 588 | # endif |
582 | } | 589 | } |
diff --git a/apps/codecs/libmad/frame.c b/apps/codecs/libmad/frame.c index 4b592d02ef..9a6dca0f0f 100644 --- a/apps/codecs/libmad/frame.c +++ b/apps/codecs/libmad/frame.c | |||
@@ -315,7 +315,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
315 | if (!stream->sync) | 315 | if (!stream->sync) |
316 | ptr = stream->this_frame; | 316 | ptr = stream->this_frame; |
317 | 317 | ||
318 | if (end - ptr < stream->skiplen) { | 318 | if (end - ptr < (long) stream->skiplen) { |
319 | stream->skiplen -= end - ptr; | 319 | stream->skiplen -= end - ptr; |
320 | stream->next_frame = end; | 320 | stream->next_frame = end; |
321 | 321 | ||
@@ -400,7 +400,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
400 | } | 400 | } |
401 | 401 | ||
402 | /* verify there is enough data left in buffer to decode this frame */ | 402 | /* verify there is enough data left in buffer to decode this frame */ |
403 | if (N + MAD_BUFFER_GUARD > end - stream->this_frame) { | 403 | if ((long)(N + MAD_BUFFER_GUARD) > end - stream->this_frame) { |
404 | stream->next_frame = stream->this_frame; | 404 | stream->next_frame = stream->this_frame; |
405 | 405 | ||
406 | stream->error = MAD_ERROR_BUFLEN; | 406 | stream->error = MAD_ERROR_BUFLEN; |
diff --git a/apps/codecs/libmad/huffman.c b/apps/codecs/libmad/huffman.c index f4fe61bd04..80bb3ddef1 100644 --- a/apps/codecs/libmad/huffman.c +++ b/apps/codecs/libmad/huffman.c | |||
@@ -3078,7 +3078,7 @@ struct hufftable const mad_huff_pair_table[32] = { | |||
3078 | /* 1 */ { hufftab1, 0, 3 }, | 3078 | /* 1 */ { hufftab1, 0, 3 }, |
3079 | /* 2 */ { hufftab2, 0, 3 }, | 3079 | /* 2 */ { hufftab2, 0, 3 }, |
3080 | /* 3 */ { hufftab3, 0, 3 }, | 3080 | /* 3 */ { hufftab3, 0, 3 }, |
3081 | /* 4 */ { 0 /* not used */ }, | 3081 | /* 4 */ { hufftab0, 0, 0 }, /* not used */ |
3082 | /* 5 */ { hufftab5, 0, 3 }, | 3082 | /* 5 */ { hufftab5, 0, 3 }, |
3083 | /* 6 */ { hufftab6, 0, 4 }, | 3083 | /* 6 */ { hufftab6, 0, 4 }, |
3084 | /* 7 */ { hufftab7, 0, 4 }, | 3084 | /* 7 */ { hufftab7, 0, 4 }, |
@@ -3088,7 +3088,7 @@ struct hufftable const mad_huff_pair_table[32] = { | |||
3088 | /* 11 */ { hufftab11, 0, 4 }, | 3088 | /* 11 */ { hufftab11, 0, 4 }, |
3089 | /* 12 */ { hufftab12, 0, 4 }, | 3089 | /* 12 */ { hufftab12, 0, 4 }, |
3090 | /* 13 */ { hufftab13, 0, 4 }, | 3090 | /* 13 */ { hufftab13, 0, 4 }, |
3091 | /* 14 */ { 0 /* not used */ }, | 3091 | /* 14 */ { hufftab0, 0, 0 }, /* not used */ |
3092 | /* 15 */ { hufftab15, 0, 4 }, | 3092 | /* 15 */ { hufftab15, 0, 4 }, |
3093 | /* 16 */ { hufftab16, 1, 4 }, | 3093 | /* 16 */ { hufftab16, 1, 4 }, |
3094 | /* 17 */ { hufftab16, 2, 4 }, | 3094 | /* 17 */ { hufftab16, 2, 4 }, |
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c index 7a59e70241..df1084eb92 100644 --- a/apps/codecs/libmad/layer3.c +++ b/apps/codecs/libmad/layer3.c | |||
@@ -894,7 +894,7 @@ mad_fixed_t III_requantize(unsigned int value, signed int exp) | |||
894 | exp += power->exponent; | 894 | exp += power->exponent; |
895 | 895 | ||
896 | if (exp < 0) { | 896 | if (exp < 0) { |
897 | if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) { | 897 | if (-exp >= (signed int) (sizeof(mad_fixed_t) * CHAR_BIT)) { |
898 | /* underflow */ | 898 | /* underflow */ |
899 | requantized = 0; | 899 | requantized = 0; |
900 | } | 900 | } |
@@ -1053,7 +1053,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], | |||
1053 | break; | 1053 | break; |
1054 | 1054 | ||
1055 | case 15: | 1055 | case 15: |
1056 | if (cachesz < linbits + 2) { | 1056 | if ((unsigned int)cachesz < linbits + 2) { |
1057 | bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); | 1057 | bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); |
1058 | cachesz += 16; | 1058 | cachesz += 16; |
1059 | bits_left -= 16; | 1059 | bits_left -= 16; |
@@ -1088,7 +1088,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], | |||
1088 | break; | 1088 | break; |
1089 | 1089 | ||
1090 | case 15: | 1090 | case 15: |
1091 | if (cachesz < linbits + 1) { | 1091 | if ((unsigned int)cachesz < linbits + 1) { |
1092 | bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); | 1092 | bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); |
1093 | cachesz += 16; | 1093 | cachesz += 16; |
1094 | bits_left -= 16; | 1094 | bits_left -= 16; |