提交 fb117ff2 编写于 作者: G Gustavo A. R. Silva 提交者: Zheng Zengkai

netfilter: Fix fall-through warnings for Clang

stable inclusion
from stable-5.10.68
commit 1cf43a1e5782167cff8afcc35074994517436269
bugzilla: 182671 https://gitee.com/openeuler/kernel/issues/I4EWUH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1cf43a1e5782167cff8afcc35074994517436269

--------------------------------

[ Upstream commit c2168e6b ]

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/115Acked-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b32531c8
...@@ -397,6 +397,7 @@ dccp_new(struct nf_conn *ct, const struct sk_buff *skb, ...@@ -397,6 +397,7 @@ dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
msg = "not picking up existing connection "; msg = "not picking up existing connection ";
goto out_invalid; goto out_invalid;
} }
break;
case CT_DCCP_REQUEST: case CT_DCCP_REQUEST:
break; break;
case CT_DCCP_INVALID: case CT_DCCP_INVALID:
......
...@@ -8394,6 +8394,7 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx, ...@@ -8394,6 +8394,7 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx,
data->verdict.chain); data->verdict.chain);
if (err < 0) if (err < 0)
return err; return err;
break;
default: default:
break; break;
} }
......
...@@ -528,6 +528,7 @@ static void __nft_ct_set_destroy(const struct nft_ctx *ctx, struct nft_ct *priv) ...@@ -528,6 +528,7 @@ static void __nft_ct_set_destroy(const struct nft_ctx *ctx, struct nft_ct *priv)
case NFT_CT_ZONE: case NFT_CT_ZONE:
if (--nft_ct_pcpu_template_refcnt == 0) if (--nft_ct_pcpu_template_refcnt == 0)
nft_ct_tmpl_put_pcpu(); nft_ct_tmpl_put_pcpu();
break;
#endif #endif
default: default:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册