]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify way we tag unreachable code with only ISC_UNREACHABLE()
authorOndřej Surý <ondrej@sury.org>
Mon, 11 Oct 2021 10:50:17 +0000 (12:50 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 25 Mar 2022 08:33:51 +0000 (09:33 +0100)
commit75f9dd8e8260304d20da5a57e12014eeec08dfc6
tree3a8eb8130b0a7c77ff738200997206b7be47a97e
parent673e53f81dd6cbb5cfd7d3817007a3ecba6b3122
Simplify way we tag unreachable code with only ISC_UNREACHABLE()

Previously, the unreachable code paths would have to be tagged with:

    INSIST(0);
    ISC_UNREACHABLE();

There was also older parts of the code that used comment annotation:

    /* NOTREACHED */

Unify the handling of unreachable code paths to just use:

    UNREACHABLE();

The UNREACHABLE() macro now asserts when reached and also uses
__builtin_unreachable(); when such builtin is available in the compiler.

(cherry picked from commit 584f0d7a7e89f4681b78dee157f7a2807812023a)
88 files changed:
bin/check/named-checkconf.c
bin/check/named-checkzone.c
bin/confgen/ddns-confgen.c
bin/delv/delv.c
bin/dig/dig.c
bin/dig/dighost.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssectool.c
bin/named/config.c
bin/named/logconf.c
bin/named/server.c
bin/named/zoneconf.c
bin/tests/system/rpz/dnsrps.c
bin/tests/wire_test.c
bin/tools/mdig.c
cocci/unreachable.spatch
contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c
doc/dev/style.md
lib/bind9/check.c
lib/dns/acl.c
lib/dns/client.c
lib/dns/diff.c
lib/dns/dispatch.c
lib/dns/dnsrps.c
lib/dns/dnstap.c
lib/dns/ds.c
lib/dns/ecs.c
lib/dns/hmac_link.c
lib/dns/journal.c
lib/dns/keymgr.c
lib/dns/master.c
lib/dns/masterdump.c
lib/dns/message.c
lib/dns/name.c
lib/dns/opensslecdsa_link.c
lib/dns/opensslrsa_link.c
lib/dns/peer.c
lib/dns/pkcs11ecdsa_link.c
lib/dns/pkcs11eddsa_link.c
lib/dns/pkcs11rsa_link.c
lib/dns/rbtdb.c
lib/dns/rdata/generic/amtrelay_260.c
lib/dns/rdata/generic/loc_29.c
lib/dns/rdata/in_1/svcb_64.c
lib/dns/resolver.c
lib/dns/rpz.c
lib/dns/rrl.c
lib/dns/sdb.c
lib/dns/sdlz.c
lib/dns/ssu.c
lib/dns/tests/dnstest.c
lib/dns/tests/geoip_test.c
lib/dns/tsec.c
lib/dns/update.c
lib/dns/validator.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/irs/getnameinfo.c
lib/isc/app.c
lib/isc/assertions.c
lib/isc/include/isc/assertions.h
lib/isc/include/isc/util.h
lib/isc/log.c
lib/isc/mem.c
lib/isc/netaddr.c
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/udp.c
lib/isc/rwlock.c
lib/isc/siphash.c
lib/isc/sockaddr.c
lib/isc/unix/interfaceiter.c
lib/isc/unix/net.c
lib/isc/unix/socket.c
lib/isc/url.c
lib/isc/win32/include/isc/stdatomic.h
lib/isc/win32/interfaceiter.c
lib/isccc/sexpr.c
lib/isccfg/aclconf.c
lib/isccfg/namedconf.c
lib/isccfg/parser.c
lib/ns/client.c
lib/ns/query.c
lib/ns/tests/nstest.c
lib/ns/tests/query_test.c
lib/ns/xfrout.c