[ovs-dev] [PATCH V3 8/9] datapath: conntrack: mark expected switch fall-through

Greg Rose gvrose8192 at gmail.com
Wed Mar 4 23:04:19 UTC 2020


From: "Gustavo A. R. Silva" <garsilva at embeddedor.com>

Upstream commit:
    commit 279badc2a85be83e0187b8c566e3b476b76a87a2
    Author: Gustavo A. R. Silva <garsilva at embeddedor.com>
    Date:   Thu Oct 19 12:55:03 2017 -0500

    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.

    Signed-off-by: Gustavo A. R. Silva <garsilva at embeddedor.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
 datapath/conntrack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/datapath/conntrack.c b/datapath/conntrack.c
index b7eb53f..5b4d6cc 100644
--- a/datapath/conntrack.c
+++ b/datapath/conntrack.c
@@ -844,6 +844,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.
-- 
1.8.3.1



More information about the dev mailing list