summaryrefslogtreecommitdiffstats
path: root/src/optimize.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-08-29 20:54:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-08-30 09:47:12 +0200
commitbda4c8b60db5a5814703334bc0c99bde8a59f0f1 (patch)
treeb00109bffd8d4f7f9e0ae49a1f35ca7cc0dc563d /src/optimize.c
parent06810e15bcfea356ccecde9317dd860b0f29df06 (diff)
utils: call abort() after BUG() macro
Otherwise, we get spurious warnings. The compiler should be aware that there is no return from BUG(). Call abort() there, which is marked as __attribute__ ((__noreturn__)). In file included from ./include/nftables.h:6, from ./include/rule.h:4, from src/payload.c:26: src/payload.c: In function 'icmp_dep_to_type': ./include/utils.h:39:34: error: this statement may fall through [-Werror=implicit-fallthrough=] 39 | #define BUG(fmt, arg...) ({ fprintf(stderr, "BUG: " fmt, ##arg); assert(0); }) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/payload.c:791:17: note: in expansion of macro 'BUG' 791 | BUG("Invalid map for simple dependency"); | ^~~ src/payload.c:792:9: note: here 792 | case PROTO_ICMP_ECHO: return ICMP_ECHO; | ^~~~ Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/optimize.c')
0 files changed, 0 insertions, 0 deletions