Skip to content

Commit

Permalink
wave: Fixed static analysis warning about dead assignment.
Browse files Browse the repository at this point in the history
(technically, this function never returns an error at this point, but since
it _does_ have an "uhoh, is this corrupt data?" comment that it ignores, we
should probably make sure we handle error cases in the future.  :)  )
  • Loading branch information
icculus committed Jun 12, 2019
1 parent 32ead2c commit 2fa33d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/audio/SDL_wave.c
Expand Up @@ -1107,9 +1107,11 @@ IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)

/* Initialize decoder with the values from the block header. */
result = IMA_ADPCM_DecodeBlockHeader(&state);
if (result == 0) {
/* Decode the block data. It stores the samples directly in the output. */
result = IMA_ADPCM_DecodeBlockData(&state);
}

/* Decode the block data. It stores the samples directly in the output. */
result = IMA_ADPCM_DecodeBlockData(&state);
if (result == -1) {
/* Unexpected end. Stop decoding and return partial data if necessary. */
if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {
Expand Down

0 comments on commit 2fa33d6

Please sign in to comment.