]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Frame Relay: denote a genuine fall through case
authorDenis Ovsienko <[email protected]>
Fri, 21 Jul 2017 21:58:35 +0000 (22:58 +0100)
committerDenis Ovsienko <[email protected]>
Sat, 22 Jul 2017 18:35:06 +0000 (19:35 +0100)
The source code comment explains it should fall through but GCC does not
pick it up, that's what the new macro is for.

./print-fr.c: In function ‘mfr_print’:
./print-fr.c:510:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
                 if (ie_len == sizeof(struct timeval)) {
                    ^
./print-fr.c:521:13: note: here
             case MFR_CTRL_IE_VENDOR_EXT:
             ^~~~

print-fr.c

index da7ee25f0ab42c3deac9efdec3cb8342d6f5ef7a..dad8173c7e23bda5b22852b718eb3761b6db5362 100644 (file)
@@ -512,6 +512,7 @@ mfr_print(netdissect_options *ndo,
                     break;
                 }
                 /* fall through and hexdump if no unix timestamp */
+                ND_FALL_THROUGH;
 
                 /*
                  * FIXME those are the defined IEs that lack a decoder