]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch two warnings on AIX 7.1.
authorDenis Ovsienko <[email protected]>
Sun, 3 Mar 2024 00:15:31 +0000 (00:15 +0000)
committerDenis Ovsienko <[email protected]>
Sun, 3 Mar 2024 21:05:28 +0000 (21:05 +0000)
GCC 8.3.0 on AIX 7.1.5.0, as before, is not aware that longjmp() does
not return:

./gencode.c:6869:3: error: this statement may fall through
  [-Werror=implicit-fallthrough=]
./gencode.c:6874:3: error: this statement may fall through
  [-Werror=implicit-fallthrough=]

gencode.c

index bf9c28e05d47eb7064b6b6c4b39f294dfa7dd51c..f46f72e510f12466b96ce08fbd67aa03e820559e 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -6867,11 +6867,17 @@ stringtoport(compiler_state_t *cstate, const char *string, size_t string_size,
                free(cpy);
                longjmp(cstate->top_ctx, 1);
                /*NOTREACHED*/
+#ifdef _AIX
+               PCAP_UNREACHABLE
+#endif /* _AIX */
 
        case STOULEN_ERROR:
                /* Error already set. */
                longjmp(cstate->top_ctx, 1);
                /*NOTREACHED*/
+#ifdef _AIX
+               PCAP_UNREACHABLE
+#endif /* _AIX */
 
        default:
                /* Should not happen */