]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add FALLTHROUGH macro for __attribute__((fallthrough))
authorOndřej Surý <ondrej@sury.org>
Mon, 11 Oct 2021 10:09:16 +0000 (12:09 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 25 Mar 2022 08:30:16 +0000 (09:30 +0100)
commit673e53f81dd6cbb5cfd7d3817007a3ecba6b3122
tree4368a80e3f0816c70e9d741ea4df0f51f2b00be5
parent374fe8c70e88ea72701392099eb6dcc6974990c0
Add FALLTHROUGH macro for __attribute__((fallthrough))

Gcc 7+ and Clang 10+ have implemented __attribute__((fallthrough)) which
is explicit version of the /* FALLTHROUGH */ comment we are currently
using.

Add and apply FALLTHROUGH macro that uses the attribute if available,
but does nothing on older compilers.

In one case (lib/dns/zone.c), using the macro revealed that we were
using the /* FALLTHROUGH */ comment in wrong place, remove that comment.

(cherry picked from commit fe7ce629f47e7a0449b7527aad3c0b4e596b1f4e)
42 files changed:
bin/check/named-checkconf.c
bin/check/named-checkzone.c
bin/dig/host.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-revoke.c
bin/dnssec/dnssec-settime.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/named/main.c
bin/named/zoneconf.c
bin/rndc/rndc.c
bin/tests/optional/db_test.c
contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c
doc/dev/style.md
lib/bind9/getaddresses.c
lib/dns/dnssec.c
lib/dns/dnstap.c
lib/dns/masterdump.c
lib/dns/name.c
lib/dns/rdata/generic/opt_41.c
lib/dns/resolver.c
lib/dns/rootns.c
lib/dns/rpz.c
lib/dns/update.c
lib/dns/validator.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/isc/include/isc/util.h
lib/isc/lex.c
lib/isc/log.c
lib/isc/netmgr/netmgr.c
lib/isc/ratelimiter.c
lib/isc/siphash.c
lib/isc/tm.c
lib/isc/unix/socket.c
lib/isc/url.c
lib/isc/win32/socket.c
lib/isccfg/aclconf.c
lib/ns/query.c