2024-05-17 11:00:50

by Naresh Kamboju

[permalink] [raw]
Subject: clang: arch/x86/boot/printf.c:257:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

The following x86 build failed on Linux next-20240517 tag due to following
warnings / errors only seen with clang builds.

Reported-by: Linux Kernel Functional Testing <[email protected]>

Build errors:
----
arch/x86/boot/printf.c:257:3: error: unannotated fall-through between
switch labels [-Werror,-Wimplicit-fallthrough]
257 | case 'u':
| ^
arch/x86/boot/printf.c:257:3: note: insert 'break;' to avoid fall-through
257 | case 'u':
| ^
| break;
1 error generated.

The suspected patch,
x86/boot: Add a fallthrough annotation

metadata:
---
git_describe: next-20240517
git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
git_sha: c75962170e49f24399141276ae119e6a879f36dc
git_short_log: c75962170e49 ("Add linux-next specific files for 20240517")
build_name: clang-18-lkftconfig


Links:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240517/testrun/23951572/suite/build/test/clang-18-lkftconfig/log
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240517/testrun/23951572/suite/build/test/clang-18-lkftconfig/details/
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2gZwb1q4GHgVCuOfQIMCJ6tqMFn/


--
Linaro LKFT
https://lkft.linaro.org


2024-05-17 15:06:18

by Nathan Chancellor

[permalink] [raw]
Subject: Re: clang: arch/x86/boot/printf.c:257:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

Hi Naresh,

On Fri, May 17, 2024 at 01:00:25PM +0200, Naresh Kamboju wrote:
> The following x86 build failed on Linux next-20240517 tag due to following
> warnings / errors only seen with clang builds.
>
> Reported-by: Linux Kernel Functional Testing <[email protected]>
>
> Build errors:
> ----
> arch/x86/boot/printf.c:257:3: error: unannotated fall-through between
> switch labels [-Werror,-Wimplicit-fallthrough]
> 257 | case 'u':
> | ^
> arch/x86/boot/printf.c:257:3: note: insert 'break;' to avoid fall-through
> 257 | case 'u':
> | ^
> | break;
> 1 error generated.
>
> The suspected patch,
> x86/boot: Add a fallthrough annotation

Thanks for the report, this has been addressed:

https://git.kernel.org/tip/82110ae235e0560d1f952f74f9fd991587b0e3a7

Cheers,
Nathan