]> The Tcpdump Group git mirrors - tcpdump/commit
Squelch a noreturn warning on AIX. [skip ci]
authorDenis Ovsienko <[email protected]>
Mon, 26 Jul 2021 11:01:00 +0000 (12:01 +0100)
committerDenis Ovsienko <[email protected]>
Wed, 29 Sep 2021 14:08:36 +0000 (15:08 +0100)
commitf1b4c9b16a5fd724b4a49cdd5c0c1e1d3b28461e
tree212cb05ceee36e77ebfc6528a32b407913f3d993
parent10584ece833f52a029673126f921a7e1c982c5ba
Squelch a noreturn warning on AIX. [skip ci]

GCC 8.3.0 on AIX 7.1 produced a warning for every file that has a call
to nd_trunc_longjmp():

In file included from ./cpack.c:39:
./extract.h: In function 'nd_trunc_longjmp':
./extract.h:586:1: warning: 'noreturn' function does return

As far as longjmp(3) man page and <setjmp.h> header go, longjmp() is as
noreturn in AIX as everywhere else, but not in a way that GCC can tell.

Disabling -Wsuggest-attribute=noreturn and -Wmissing-noreturn had no
apparent effect, so instead of using diag-control.h add an infinite loop
on AIX to squelch the warning.

(cherry picked from commit b7401ffd865af51060604b7eb76ff593397293d6)
extract.h