diff mbox series

[ovs-dev] openvswitch: conntrack: mark expected switch fall-through

Message ID 20171019175503.GA28691@embeddedor.com
State Not Applicable
Headers show
Series [ovs-dev] openvswitch: conntrack: mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Oct. 19, 2017, 5:55 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case I placed a "fall through" comment on
its own line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/openvswitch/conntrack.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Oct. 22, 2017, 1:02 a.m. UTC | #1
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Thu, 19 Oct 2017 12:55:03 -0500

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case I placed a "fall through" comment on
> its own line, which is what GCC is expecting to find.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied.
diff mbox series

Patch

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index fe861e2..b27c5c6 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -752,6 +752,7 @@  static int ovs_ct_nat_execute(struct sk_buff *skb, struct nf_conn *ct,
 			}
 		}
 		/* Non-ICMP, fall thru to initialize if needed. */
+		/* fall through */
 	case IP_CT_NEW:
 		/* Seen it before?  This can happen for loopback, retrans,
 		 * or local packets.