Re: [PATCH] sound: ppc: beep: fix clang -Wimplicit-fallthrough

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 07 Dec 2021 12:00:53 +0100,
Anders Roxell wrote:
> 
> 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@xxxxxxxxxx>
> Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>

Thanks, applied.


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux