Fix compiler warnings in Native Client and Linux builds.

This commit is contained in:
Sam Clegg
2014-06-20 11:10:16 -03:00
parent 6c5cb5400f
commit 7e52722dfd
10 changed files with 34 additions and 7 deletions

View File

@@ -121,7 +121,8 @@ MS_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
struct MS_ADPCM_decodestate *state[2];
Uint8 *freeable, *encoded, *decoded;
Sint32 encoded_len, samplesleft;
Sint8 nybble, stereo;
Sint8 nybble;
Uint8 stereo;
Sint16 *coeff[2];
Sint32 new_sample;
@@ -278,7 +279,8 @@ IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
} else if (state->index < 0) {
state->index = 0;
}
step = step_table[state->index];
/* explicit cast to avoid gcc warning about using 'char' as array index */
step = step_table[(int)state->index];
delta = step >> 3;
if (nybble & 0x04)
delta += step;