Skip to content

Commit

Permalink
netfilter: Fix fall-through warnings for Clang
Browse files Browse the repository at this point in the history
[ Upstream commit c2168e6 ]

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: KSPP/linux#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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
GustavoARSilva authored and gregkh committed Sep 22, 2021
1 parent 9e89c22 commit 1cf43a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/nf_conntrack_proto_dccp.c
Expand Up @@ -397,6 +397,7 @@ dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
msg = "not picking up existing connection ";
goto out_invalid;
}
break;
case CT_DCCP_REQUEST:
break;
case CT_DCCP_INVALID:
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/nf_tables_api.c
Expand Up @@ -8394,6 +8394,7 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx,
data->verdict.chain);
if (err < 0)
return err;
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/nft_ct.c
Expand Up @@ -528,6 +528,7 @@ static void __nft_ct_set_destroy(const struct nft_ctx *ctx, struct nft_ct *priv)
case NFT_CT_ZONE:
if (--nft_ct_pcpu_template_refcnt == 0)
nft_ct_tmpl_put_pcpu();
break;
#endif
default:
break;
Expand Down

0 comments on commit 1cf43a1

Please sign in to comment.