Skip to content
Permalink
Browse files

load_voc.c, music_flac.c: fix implicit-fallthrough warnings.

  • Loading branch information
sezero committed Dec 18, 2019
1 parent 7775b66 commit 8851679d5022ab8aa77a4596c895dd91948b23f6
Showing with 9 additions and 10 deletions.
  1. +7 −7 src/codecs/load_voc.c
  2. +2 −3 src/codecs/music_flac.c
@@ -301,7 +301,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
if (SDL_RWread(src, trash, sizeof (Uint8), 2) != 2)
return 0;

/* Falling! Falling! */
/* fallthrough */

default: /* text block or other krapola. */
for(i = 0; i < sblen; i++)
@@ -351,12 +351,12 @@ static Uint32 voc_read(SDL_RWops *src, vs_t *v, Uint8 *buf, SDL_AudioSpec *spec)
if (v->size == ST_SIZE_WORD)
{
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
Uint16 *samples = (Uint16 *)buf;
for (; v->rest > 0; v->rest -= 2)
{
*samples = SDL_SwapLE16(*samples);
samples++;
}
Uint16 *samples = (Uint16 *)buf;
for (; v->rest > 0; v->rest -= 2)
{
*samples = SDL_SwapLE16(*samples);
samples++;
}
#endif
done >>= 1;
}
@@ -555,9 +555,9 @@ static void *FLAC_CreateFromRW(SDL_RWops *src, int freesrc)
if (was_error) {
switch (init_stage) {
case 2:
flac.FLAC__stream_decoder_finish(music->flac_decoder);
flac.FLAC__stream_decoder_finish(music->flac_decoder); /* fallthrough */
case 1:
flac.FLAC__stream_decoder_delete(music->flac_decoder);
flac.FLAC__stream_decoder_delete(music->flac_decoder); /* fallthrough */
case 0:
SDL_free(music);
break;
@@ -568,7 +568,6 @@ static void *FLAC_CreateFromRW(SDL_RWops *src, int freesrc)
/* loop_start, loop_end and loop_len get set by metadata callback if tags
* are present in metadata.
*/

full_length = flac.FLAC__stream_decoder_get_total_samples(music->flac_decoder);
if (((music->loop_start >= 0) || (music->loop_end > 0)) &&
((music->loop_start < music->loop_end) || (music->loop_end > 0)) &&

0 comments on commit 8851679

Please sign in to comment.