{input,output}/alsa: fix gcc 7.0 -Wimplicit-fallthrough

This commit is contained in:
Max Kellermann 2016-11-16 19:50:38 +01:00
parent 1859ba5ec8
commit 5c3e55b5b1
3 changed files with 8 additions and 0 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.19.20 (not yet released)
- sidplay: fix playback speed with libsidplayfp - sidplay: fix playback speed with libsidplayfp
* output * output
- winmm: fix 8 bit playback - winmm: fix 8 bit playback
* fix gcc 7.0 -Wimplicit-fallthrough
ver 0.19.19 (2016/08/23) ver 0.19.19 (2016/08/23)
* decoder * decoder

View File

@ -247,6 +247,10 @@ AlsaInputStream::Recover(int err)
case -EPIPE: case -EPIPE:
LogDebug(alsa_input_domain, "Buffer Overrun"); LogDebug(alsa_input_domain, "Buffer Overrun");
// drop through // drop through
#if GCC_CHECK_VERSION(7,0)
[[fallthrough]];
#endif
case -ESTRPIPE: case -ESTRPIPE:
case -EINTR: case -EINTR:
err = snd_pcm_recover(capture_handle, err, 1); err = snd_pcm_recover(capture_handle, err, 1);

View File

@ -760,6 +760,9 @@ alsa_recover(AlsaOutput *ad, int err)
if (err == -EAGAIN) if (err == -EAGAIN)
return 0; return 0;
/* fall-through to snd_pcm_prepare: */ /* fall-through to snd_pcm_prepare: */
#if GCC_CHECK_VERSION(7,0)
[[fallthrough]];
#endif
case SND_PCM_STATE_SETUP: case SND_PCM_STATE_SETUP:
case SND_PCM_STATE_XRUN: case SND_PCM_STATE_XRUN:
ad->period_position = 0; ad->period_position = 0;