From 143476ce8d3aa4595ce7040cb0aabd2fd0e13dc8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 14 Sep 2021 09:17:54 -0700 Subject: Use fallthrough macro As of the Linux 5.9 kernel a fallthrough macro has been added which should be used to anotate all intentional fallthrough paths. Once all of the kernel code paths have been updated to use fallthrough the -Wimplicit-fallthrough option will because the default. To avoid warnings in the OpenZFS code base when this happens apply the fallthrough macro. Additional reading: https://lwn.net/Articles/794944/ Reviewed-by: Tony Nguyen Reviewed-by: George Melikov Signed-off-by: Brian Behlendorf Closes #12441 --- module/lua/lcode.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/lua/lcode.c') diff --git a/module/lua/lcode.c b/module/lua/lcode.c index ae9a3d91d..4d88c792a 100644 --- a/module/lua/lcode.c +++ b/module/lua/lcode.c @@ -8,6 +8,10 @@ #define lcode_c #define LUA_CORE +#if defined(HAVE_IMPLICIT_FALLTHROUGH) +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#endif + #include #include "lcode.h" -- cgit v1.2.3