{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

View File

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

View File

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