From 26cfab95cff2af83a64e9d89dd15de913cebf233 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Sun, 26 Apr 2020 23:27:54 +0100 Subject: [PATCH] suppress "this statement may fall through" warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The semi-colon is needed, to prevent the comment being parsed as part of the "if {...}" statement. The warning looks like this: seeed-voicecard/wm8960.c: In function ‘wm8960_hw_params’: seeed-voicecard/wm8960.c:752:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 752 | if ((iface & 0x3) != 0) { | ^ seeed-voicecard/wm8960.c:757:2: note: here 757 | default: | ^~~~~~~ --- wm8960.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wm8960.c b/wm8960.c index f26f59b..c2975e1 100644 --- a/wm8960.c +++ b/wm8960.c @@ -752,7 +752,8 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, if ((iface & 0x3) != 0) { iface |= 0x000c; break; - } + }; + /* fall through */ default: dev_err(codec->dev, "unsupported width %d\n", params_width(params));