load_voc.c, music_flac.c: fix implicit-fallthrough warnings.
authorOzkan Sezer
Wed, 18 Dec 2019 15:51:40 +0300
changeset 10936f0bea2ab267
parent 1092 e7e3052b74ae
child 1094 34c7e301904d
load_voc.c, music_flac.c: fix implicit-fallthrough warnings.
src/codecs/load_voc.c
src/codecs/music_flac.c
     1.1 --- a/src/codecs/load_voc.c	Tue Dec 17 21:56:56 2019 +0300
     1.2 +++ b/src/codecs/load_voc.c	Wed Dec 18 15:51:40 2019 +0300
     1.3 @@ -301,7 +301,7 @@
     1.4                  if (SDL_RWread(src, trash, sizeof (Uint8), 2) != 2)
     1.5                      return 0;
     1.6  
     1.7 -                /* Falling! Falling! */
     1.8 +                /* fallthrough */
     1.9  
    1.10              default:  /* text block or other krapola. */
    1.11                  for(i = 0; i < sblen; i++)
    1.12 @@ -351,12 +351,12 @@
    1.13          if (v->size == ST_SIZE_WORD)
    1.14          {
    1.15              #if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.16 -                Uint16 *samples = (Uint16 *)buf;
    1.17 -                for (; v->rest > 0; v->rest -= 2)
    1.18 -                {
    1.19 -                    *samples = SDL_SwapLE16(*samples);
    1.20 -                    samples++;
    1.21 -                }
    1.22 +            Uint16 *samples = (Uint16 *)buf;
    1.23 +            for (; v->rest > 0; v->rest -= 2)
    1.24 +            {
    1.25 +                *samples = SDL_SwapLE16(*samples);
    1.26 +                samples++;
    1.27 +            }
    1.28              #endif
    1.29              done >>= 1;
    1.30          }
     2.1 --- a/src/codecs/music_flac.c	Tue Dec 17 21:56:56 2019 +0300
     2.2 +++ b/src/codecs/music_flac.c	Wed Dec 18 15:51:40 2019 +0300
     2.3 @@ -555,9 +555,9 @@
     2.4      if (was_error) {
     2.5          switch (init_stage) {
     2.6              case 2:
     2.7 -                flac.FLAC__stream_decoder_finish(music->flac_decoder);
     2.8 +                flac.FLAC__stream_decoder_finish(music->flac_decoder); /* fallthrough */
     2.9              case 1:
    2.10 -                flac.FLAC__stream_decoder_delete(music->flac_decoder);
    2.11 +                flac.FLAC__stream_decoder_delete(music->flac_decoder); /* fallthrough */
    2.12              case 0:
    2.13                  SDL_free(music);
    2.14                  break;
    2.15 @@ -568,7 +568,6 @@
    2.16      /* loop_start, loop_end and loop_len get set by metadata callback if tags
    2.17       * are present in metadata.
    2.18       */
    2.19 -
    2.20      full_length = flac.FLAC__stream_decoder_get_total_samples(music->flac_decoder);
    2.21      if (((music->loop_start >= 0) || (music->loop_end > 0)) &&
    2.22          ((music->loop_start < music->loop_end) || (music->loop_end > 0)) &&