[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libreswan-dev
Subject:    Re: [Swan-dev] [libreswan/libreswan] Multiple compile errors with gcc (GCC) 7.1.1 20170528 (#104)
From:       Paul Wouters <paul () nohats ! ca>
Date:       2017-06-14 19:39:38
Message-ID: alpine.LRH.2.20.999.1706141537250.23684 () bofh ! nohats ! ca
[Download RAW message or body]

On Wed, 14 Jun 2017, Antony Antony wrote:

> for Wimplicit-fallthrough=3 complaince
> I have a patch sitting around when I played with F26. It is attached here to test.
> It could be applied, I haven't double checked it yet.

So I checked the eroute one, and cleaned up the break;s so it makes more
sense. The one in pfkey.c is weird:

diff --git a/linux/net/ipsec/pfkey_v2_parse.c
b/linux/net/ipsec/pfkey_v2_parse.c
index 363a5d6..247cd21 100644
--- a/linux/net/ipsec/pfkey_v2_parse.c
+++ b/linux/net/ipsec/pfkey_v2_parse.c
@@ -1302,6 +1302,7 @@ int pfkey_msg_parse(struct sadb_msg *pfkey_msg,
                                   pfkey_v2_sadb_type_string(pfkey_msg->
                                                             sadb_msg_type));
                 }
+               /* FALLTHROUGH */
         case K_SADB_ACQUIRE:
         case K_SADB_REGISTER:
         case K_SADB_EXPIRE:


That basically makes the resulting chunk of code work on _every_ case,
which leads to the question, why is it inside the switch().

A quick peek shows this goes at least as far back as openswan-2.3.x,
probably even further. So maybe Richard can answer this one :)

Paul
_______________________________________________
Swan-dev mailing list
Swan-dev@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic