1
0
Fork 0
forked from len0rd/rockbox

Very minor changes to remove compiler warnings (tested with gcc-3.4.2 under Linux)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5958 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2005-02-15 20:23:10 +00:00
parent f59bfba605
commit 1ec83e2069
4 changed files with 14 additions and 7 deletions

View file

@ -119,6 +119,9 @@ int mad_decoder_finish(struct mad_decoder *decoder)
return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0;
}
# else
/* Avoid compiler warning */
(void)decoder;
# endif
return 0;
@ -577,6 +580,10 @@ int mad_decoder_message(struct mad_decoder *decoder,
return 0;
# else
/* Avoid compiler warnings */
(void)decoder;
(void)message;
(void)len;
return -1;
# endif
}

View file

@ -315,7 +315,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
if (!stream->sync)
ptr = stream->this_frame;
if (end - ptr < stream->skiplen) {
if (end - ptr < (long) stream->skiplen) {
stream->skiplen -= end - ptr;
stream->next_frame = end;
@ -400,7 +400,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
}
/* verify there is enough data left in buffer to decode this frame */
if (N + MAD_BUFFER_GUARD > end - stream->this_frame) {
if ((long)(N + MAD_BUFFER_GUARD) > end - stream->this_frame) {
stream->next_frame = stream->this_frame;
stream->error = MAD_ERROR_BUFLEN;

View file

@ -3078,7 +3078,7 @@ struct hufftable const mad_huff_pair_table[32] = {
/* 1 */ { hufftab1, 0, 3 },
/* 2 */ { hufftab2, 0, 3 },
/* 3 */ { hufftab3, 0, 3 },
/* 4 */ { 0 /* not used */ },
/* 4 */ { hufftab0, 0, 0 }, /* not used */
/* 5 */ { hufftab5, 0, 3 },
/* 6 */ { hufftab6, 0, 4 },
/* 7 */ { hufftab7, 0, 4 },
@ -3088,7 +3088,7 @@ struct hufftable const mad_huff_pair_table[32] = {
/* 11 */ { hufftab11, 0, 4 },
/* 12 */ { hufftab12, 0, 4 },
/* 13 */ { hufftab13, 0, 4 },
/* 14 */ { 0 /* not used */ },
/* 14 */ { hufftab0, 0, 0 }, /* not used */
/* 15 */ { hufftab15, 0, 4 },
/* 16 */ { hufftab16, 1, 4 },
/* 17 */ { hufftab16, 2, 4 },

View file

@ -894,7 +894,7 @@ mad_fixed_t III_requantize(unsigned int value, signed int exp)
exp += power->exponent;
if (exp < 0) {
if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) {
if (-exp >= (signed int) (sizeof(mad_fixed_t) * CHAR_BIT)) {
/* underflow */
requantized = 0;
}
@ -1053,7 +1053,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
break;
case 15:
if (cachesz < linbits + 2) {
if ((unsigned int)cachesz < linbits + 2) {
bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
cachesz += 16;
bits_left -= 16;
@ -1088,7 +1088,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
break;
case 15:
if (cachesz < linbits + 1) {
if ((unsigned int)cachesz < linbits + 1) {
bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
cachesz += 16;
bits_left -= 16;