From d3e10fd8235d8965a032bbe221f7693976c3f1ac Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 13 May 2023 23:56:18 +0200 Subject: [PATCH] netatop: fix compilation warning for kernel module Fix compilation warning for missing fallthrough. Fix compilation warning: /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/netatop-3.1/module/netatop.c: In function 'getsockopt': /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/netatop-3.1/module/netatop.c:1619:26: error: this statement may fall through [-Werror=implicit-fallthrough=] 1619 | tasktype = 'g'; | ~~~~~~~~~^~~~~ /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/netatop-3.1/module/netatop.c:1621:12: note: here 1621 | case NETATOP_GETCNT_PID: | ^~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi --- .../100-fix-compilation-warning-fallthrough.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch diff --git a/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch b/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch new file mode 100644 index 0000000000..65de31e149 --- /dev/null +++ b/admin/netatop/patches/100-fix-compilation-warning-fallthrough.patch @@ -0,0 +1,11 @@ +--- a/module/netatop.c ++++ b/module/netatop.c +@@ -1617,7 +1617,7 @@ getsockopt(struct sock *sk, int cmd, void __user *user, int *len) + + case NETATOP_GETCNT_TGID: + tasktype = 'g'; +- // fall through ++ fallthrough; + case NETATOP_GETCNT_PID: + if (*len < sizeof(pid_t)) + return -EINVAL;