fix implicit-fallthrough warnings under clang

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-15 22:32:00 -07:00
parent b5d1a09010
commit 7f10e7a610
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
3 changed files with 5 additions and 3 deletions

View File

@ -289,7 +289,7 @@ AlsaInputStream::Recover(int err)
if (err == -EAGAIN)
return 0;
/* fall-through to snd_pcm_prepare: */
#if GCC_CHECK_VERSION(7,0)
#if CLANG_OR_GCC_VERSION(7,0)
[[fallthrough]];
#endif
case SND_PCM_STATE_OPEN:

View File

@ -763,7 +763,7 @@ AlsaOutput::Recover(int err) noexcept
if (err == -EAGAIN)
return 0;
/* fall-through to snd_pcm_prepare: */
#if GCC_CHECK_VERSION(7,0)
#if CLANG_OR_GCC_VERSION(7,0)
[[fallthrough]];
#endif
case SND_PCM_STATE_OPEN:

View File

@ -1176,7 +1176,9 @@ try {
}
/* fall through */
gcc_fallthrough;
#if CLANG_OR_GCC_VERSION(7,0)
[[fallthrough]];
#endif
case PlayerCommand::PAUSE:
next_song.reset();