wave: Fixed static analysis warning about dead assignment.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 12 Jun 2019 15:43:08 -0400
changeset 1285104505849b231
parent 12850 f20a317cc8ad
child 12852 afe3c46cc37e
wave: Fixed static analysis warning about dead assignment.

(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. :) )
src/audio/SDL_wave.c
     1.1 --- a/src/audio/SDL_wave.c	Wed Jun 12 15:37:07 2019 -0400
     1.2 +++ b/src/audio/SDL_wave.c	Wed Jun 12 15:43:08 2019 -0400
     1.3 @@ -1107,9 +1107,11 @@
     1.4  
     1.5          /* Initialize decoder with the values from the block header. */
     1.6          result = IMA_ADPCM_DecodeBlockHeader(&state);
     1.7 +        if (result == 0) {
     1.8 +            /* Decode the block data. It stores the samples directly in the output. */
     1.9 +            result = IMA_ADPCM_DecodeBlockData(&state);
    1.10 +        }
    1.11  
    1.12 -        /* Decode the block data. It stores the samples directly in the output. */
    1.13 -        result = IMA_ADPCM_DecodeBlockData(&state);
    1.14          if (result == -1) {
    1.15              /* Unexpected end. Stop decoding and return partial data if necessary. */
    1.16              if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {