From 7f10e7a6109bbbc38ba0e4c46c223fb35841efb6 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sun, 15 Mar 2020 22:32:00 -0700
Subject: [PATCH] fix implicit-fallthrough warnings under clang

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 src/input/plugins/AlsaInputPlugin.cxx   | 2 +-
 src/output/plugins/AlsaOutputPlugin.cxx | 2 +-
 src/player/Thread.cxx                   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx
index d09126d14..a8ca6049a 100644
--- a/src/input/plugins/AlsaInputPlugin.cxx
+++ b/src/input/plugins/AlsaInputPlugin.cxx
@@ -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:
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index 1aefbbe7d..b41b405c5 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -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:
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 39f48b7b8..d790fbb3f 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -1176,7 +1176,9 @@ try {
 			}
 
 			/* fall through */
-			gcc_fallthrough;
+#if CLANG_OR_GCC_VERSION(7,0)
+			[[fallthrough]];
+#endif
 
 		case PlayerCommand::PAUSE:
 			next_song.reset();