]> www.infradead.org Git - users/willy/xarray.git/commit
tools/nolibc: compiler: add macro __nolibc_fallthrough
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 30 Sep 2024 05:35:19 +0000 (07:35 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 7 Oct 2024 19:56:18 +0000 (21:56 +0200)
commit079ec6a3cf529d86c2895059eb8be1b36cc9fd72
tree4e785d23c9542dbf112889b63ce08c793b40e36b
parent711b5875814b2a0e9a5aaf7a85ba7c80f5a389b1
tools/nolibc: compiler: add macro __nolibc_fallthrough

Recent version of GCC and clang gained -Wimplicit-fallthrough,
warning about implicit fall-through between switch labels.
As nolibc does not control the compilation flags, this can trigger
warnings for when built by the user.
Make use of the "fallthrough" attribute to explicitly annotate the
expected fall-throughs and silence the warning.

Link: https://lore.kernel.org/r/20240930-nolibc-fallthrough-v2-1-2e8d10fe3430@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/compiler.h
tools/include/nolibc/stdio.h