2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

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.
This commit is contained in:
Ondřej Surý
2021-10-11 12:09:16 +02:00
committed by Ondřej Surý
parent 4a44e9dd36
commit fe7ce629f4
41 changed files with 109 additions and 97 deletions

View File

@@ -2715,7 +2715,7 @@ dns_rpz_find_name(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
found_zbits = nm_data->set.ns;
}
}
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_R_PARTIALMATCH:
i = chain.level_matches;