Skip to content

Commit a98478f

Browse files
roxelltiwai
authored andcommitted
ALSA: ppc: beep: fix clang -Wimplicit-fallthrough
Clang warns: sound/ppc/beep.c:103:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case SND_TONE: break; ^ sound/ppc/beep.c:103:2: note: insert 'break;' to avoid fall-through case SND_TONE: break; ^ break; 1 warning generated. Clang is more pedantic than GCC, which does not warn when failing through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst. Add athe missing break to silence the warning. Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Link: https://lore.kernel.org/r/20211207110053.695712-1-anders.roxell@linaro.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent c7d5897 commit a98478f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/ppc/beep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type,
9999
return -1;
100100

101101
switch (code) {
102-
case SND_BELL: if (hz) hz = 1000;
102+
case SND_BELL: if (hz) hz = 1000; break;
103103
case SND_TONE: break;
104104
default: return -1;
105105
}

0 commit comments

Comments
 (0)