Skip to contentSkip to conversation

openvswitch: conntrack: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Oct 19, 2017 – Oct 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openvswitch: conntrack: mark expected switch fall-through

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.

---
 net/openvswitch/conntrack.c | 1 +
 1 file changed, 1 insertion(+)
net/openvswitch/conntrack.c +1 -0
index fe861e2..b27c5c6 100644
@@ -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.
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

From: "Gustavo A. R. Silva" <garsilva-L1vi/[email protected]>
Date: Thu, 19 Oct 2017 12:55:03 -0500

Quoted 7 lines

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.

Applied.