45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
|
|
Date: Tue, 23 Mar 2021 00:56:20 +0100
|
|
Subject: [PATCH] netfilter: Fix fall-through warnings for Clang
|
|
|
|
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
|
|
warnings by explicitly adding multiple break statements instead of just
|
|
letting the code fall through to the next case.
|
|
|
|
Link: https://github.com/KSPP/linux/issues/115
|
|
Acked-by: Florian Westphal <fw@strlen.de>
|
|
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
---
|
|
|
|
--- a/net/netfilter/nf_conntrack_proto_dccp.c
|
|
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
|
|
@@ -397,6 +397,7 @@ dccp_new(struct nf_conn *ct, const struc
|
|
msg = "not picking up existing connection ";
|
|
goto out_invalid;
|
|
}
|
|
+ break;
|
|
case CT_DCCP_REQUEST:
|
|
break;
|
|
case CT_DCCP_INVALID:
|
|
--- a/net/netfilter/nf_tables_api.c
|
|
+++ b/net/netfilter/nf_tables_api.c
|
|
@@ -8369,6 +8369,7 @@ static int nf_tables_check_loops(const s
|
|
data->verdict.chain);
|
|
if (err < 0)
|
|
return err;
|
|
+ break;
|
|
default:
|
|
break;
|
|
}
|
|
--- a/net/netfilter/nft_ct.c
|
|
+++ b/net/netfilter/nft_ct.c
|
|
@@ -528,6 +528,7 @@ static void __nft_ct_set_destroy(const s
|
|
case NFT_CT_ZONE:
|
|
if (--nft_ct_pcpu_template_refcnt == 0)
|
|
nft_ct_tmpl_put_pcpu();
|
|
+ break;
|
|
#endif
|
|
default:
|
|
break;
|