]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add more 'intentional fallthrough' comments
authorFrank Lichtenheld <frank@lichtenheld.com>
Fri, 28 Feb 2025 17:02:32 +0000 (18:02 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 5 Mar 2025 06:53:41 +0000 (07:53 +0100)
To make it easier to exclude them from compiler
warnings.

Based on the existing comment in init.c

Change-Id: I925accd8267f94ecfd9ccea85bae965dc2a10208
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20250228170232.322186-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30990.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/list.c
src/openvpn/push.c

index 69f1510c73547d2c49b98e8f7bd2c91a96f7a441..6987defa40af0172295c007da844a9c54bef29dd 100644 (file)
@@ -437,34 +437,44 @@ hash_func(const uint8_t *k, uint32_t length, uint32_t initval)
     {
         case 11:
             c += ((uint32_t) k[10] << 24);
+        /* Intentional [[fallthrough]]; */
 
         case 10:
             c += ((uint32_t) k[9] << 16);
+        /* Intentional [[fallthrough]]; */
 
         case 9:
             c += ((uint32_t) k[8] << 8);
+        /* Intentional [[fallthrough]]; */
 
         /* the first byte of c is reserved for the length */
         case 8:
             b += ((uint32_t) k[7] << 24);
+        /* Intentional [[fallthrough]]; */
 
         case 7:
             b += ((uint32_t) k[6] << 16);
+        /* Intentional [[fallthrough]]; */
 
         case 6:
             b += ((uint32_t) k[5] << 8);
+        /* Intentional [[fallthrough]]; */
 
         case 5:
             b += k[4];
+        /* Intentional [[fallthrough]]; */
 
         case 4:
             a += ((uint32_t) k[3] << 24);
+        /* Intentional [[fallthrough]]; */
 
         case 3:
             a += ((uint32_t) k[2] << 16);
+        /* Intentional [[fallthrough]]; */
 
         case 2:
             a += ((uint32_t) k[1] << 8);
+        /* Intentional [[fallthrough]]; */
 
         case 1:
             a += k[0];
index a7cd3bf69b8b82b339959203c81e9c1e981b91da..80f90653229512f63d16e10331aa61d571d5adf6 100644 (file)
@@ -98,6 +98,7 @@ receive_auth_failed(struct context *c, const struct buffer *buffer)
 
             case AR_INTERACT:
                 ssl_purge_auth(false);
+            /* Intentional [[fallthrough]]; */
 
             case AR_NOINTERACT:
                 /* SOFT-SIGTUSR1 -- Auth failure error */