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

@ -677,7 +677,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
usage();

View file

@ -426,7 +426,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
prog_name, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
usage();

View file

@ -770,7 +770,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
break;
case 'A':
list_almost_all = true;
/* FALL THROUGH */
FALLTHROUGH;
case 'a':
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) {

View file

@ -434,14 +434,14 @@ main(int argc, char **argv) {
}
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -385,7 +385,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -315,14 +315,14 @@ main(int argc, char **argv) {
prepub = strtottl(isc_commandline_argument);
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -1108,14 +1108,14 @@ main(int argc, char **argv) {
ctx.prepub = strtottl(isc_commandline_argument);
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -119,7 +119,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -342,7 +342,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -3642,14 +3642,14 @@ main(int argc, char *argv[]) {
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();

View file

@ -132,7 +132,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
"use -o to specify a different zone origin",
origin, file);
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
fatal("failed loading zone from '%s': %s", file,
isc_result_totext(result));
@ -262,7 +262,7 @@ main(int argc, char *argv[]) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */

View file

@ -860,8 +860,8 @@ parse_command_line(int argc, char *argv[]) {
}
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
usage();
if (isc_commandline_option == '?') {
@ -876,7 +876,7 @@ parse_command_line(int argc, char *argv[]) {
"an argument",
isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
named_main_earlyfatal("parsing options returned %d",
ch);

View file

@ -1874,7 +1874,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
dns_zone_setxfracl(zone, none);
dns_acl_detach(&none);
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_zone_secondary:
case dns_zone_stub:
case dns_zone_redirect:

View file

@ -1001,7 +1001,7 @@ main(int argc, char **argv) {
program, isc_commandline_option);
usage(1);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
usage(0);
break;

View file

@ -684,7 +684,7 @@ fnmatch(const char *pattern, const char *string, int flags) {
--pattern;
}
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
norm:
if (c == *string) {

View file

@ -145,7 +145,7 @@ Good:
The following lint and lint-like comments should be used where appropriate:
/* ARGSUSED */
/* FALLTHROUGH */
FALLTHROUGH;
/* NOTREACHED */
/* VARARGS */

View file

@ -132,7 +132,7 @@ again:
goto again;
}
#endif /* ifdef AI_ADDRCONFIG */
/* FALLTHROUGH */
FALLTHROUGH;
default:
return (ISC_R_FAILURE);
}

View file

@ -801,7 +801,7 @@ tcp_recv(isc_nmhandle_t *handle, isc_result_t result, isc_region_t *region,
}
/* Got an invalid DNS response, terminate the connection */
/* FALLTHROUGH */
FALLTHROUGH;
default:
isc_sockaddr_format(&peer, buf, sizeof(buf));
dispatch_log(disp, ISC_LOG_ERROR,

View file

@ -441,7 +441,7 @@ dns_dnssec_verify(const dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGINVALID);
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
if (!dns_name_issubdomain(name, &sig.signer)) {
inc_stat(dns_dnssecstats_fail);

View file

@ -816,7 +816,7 @@ dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype, isc_sockaddr_t *qaddr,
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_DTTYPE_AQ:
case DNS_DTTYPE_CQ:
case DNS_DTTYPE_FQ:

View file

@ -703,7 +703,7 @@ rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
isc_buffer_putstr(target, KEYDATA);
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
if ((ctx->style.flags & DNS_STYLEFLAG_UNKNOWNFORMAT) !=
0) {

View file

@ -1145,7 +1145,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case ft_start:
label = ndata;
ndata++;
@ -1160,7 +1160,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
if (nrem == 0) {
return (ISC_R_NOSPACE);
}
/* FALLTHROUGH */
FALLTHROUGH;
case ft_ordinary:
if (c == '.') {
if (count == 0) {
@ -1204,7 +1204,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
}
state = ft_escape;
POST(state);
/* FALLTHROUGH */
FALLTHROUGH;
case ft_escape:
if (!isdigit((unsigned char)c)) {
if (count >= 63) {
@ -1224,7 +1224,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
digits = 0;
value = 0;
state = ft_escdecimal;
/* FALLTHROUGH */
FALLTHROUGH;
case ft_escdecimal:
if (!isdigit((unsigned char)c)) {
return (DNS_R_BADESCAPE);
@ -1427,7 +1427,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
0) {
goto no_escape;
}
/* FALLTHROUGH */
FALLTHROUGH;
case 0x22: /* '"' */
case 0x28: /* '(' */
case 0x29: /* ')' */

View file

@ -791,7 +791,7 @@ update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) {
case DNS_R_COVERINGNSEC:
isc_stats_increment(rbtdb->cachestats,
dns_cachestatscounter_coveringnsec);
/* FALLTHROUGH */
FALLTHROUGH;
case ISC_R_SUCCESS:
case DNS_R_CNAME:
case DNS_R_DNAME:

View file

@ -233,7 +233,7 @@ fromwire_opt(ARGS_FROMWIRE) {
isc_region_consume(&sregion, length);
break;
case DNS_OPT_CLIENT_TAG:
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_OPT_SERVER_TAG:
if (length != 2) {
return (DNS_R_OPTERR);

View file

@ -7697,7 +7697,7 @@ resquery_response(isc_result_t eresult, isc_region_t *region, void *arg) {
if (query->rmessage->counts[DNS_SECTION_QUESTION] == 0) {
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_rcode_nxrrset: /* Not expected. */
case dns_rcode_badcookie:
case dns_rcode_noerror:

View file

@ -130,7 +130,7 @@ check_node(dns_rdataset_t *rootns, dns_name_t *name,
if (dns_name_compare(name, dns_rootname) == 0) {
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
result = ISC_R_FAILURE;
goto cleanup;

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;

View file

@ -1711,7 +1711,7 @@ next_state:
update_log(log, zone, ISC_LOG_DEBUG(3),
"updated data signatures");
/* FALLTHROUGH */
FALLTHROUGH;
case remove_orphaned:
state->state = remove_orphaned;
@ -1743,7 +1743,7 @@ next_state:
update_log(log, zone, ISC_LOG_DEBUG(3),
"rebuilding NSEC chain");
/* FALLTHROUGH */
FALLTHROUGH;
case build_chain:
state->state = build_chain;
/*
@ -1833,7 +1833,7 @@ next_state:
CHECK(uniqify_name_list(&state->affected));
/* FALLTHROUGH */
FALLTHROUGH;
case process_nsec:
state->state = process_nsec;
@ -1949,7 +1949,7 @@ next_state:
update_log(log, zone, ISC_LOG_DEBUG(3),
"signing rebuilt NSEC chain");
/* FALLTHROUGH */
FALLTHROUGH;
case sign_nsec:
state->state = sign_nsec;
/* Update RRSIG NSECs. */
@ -1981,7 +1981,7 @@ next_state:
}
ISC_LIST_APPENDLIST(state->nsec_mindiff.tuples,
state->work.tuples, link);
/* FALLTHROUGH */
FALLTHROUGH;
case update_nsec3:
state->state = update_nsec3;
@ -2073,7 +2073,7 @@ next_state:
}
}
/* FALLTHROUGH */
FALLTHROUGH;
case process_nsec3:
state->state = process_nsec3;
while ((t = ISC_LIST_HEAD(state->affected.tuples)) != NULL) {
@ -2124,7 +2124,7 @@ next_state:
update_log(log, zone, ISC_LOG_DEBUG(3),
"signing rebuilt NSEC3 chain");
/* FALLTHROUGH */
FALLTHROUGH;
case sign_nsec3:
state->state = sign_nsec3;
/* Update RRSIG NSEC3s. */

View file

@ -529,7 +529,7 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) {
goto unexpected;
}
/* FALLTHROUGH */
FALLTHROUGH;
case ISC_R_SUCCESS:
if (trustchain) {
/*

View file

@ -680,8 +680,7 @@ redo:
case XFRST_AXFR_END:
case XFRST_IXFR_END:
FAIL(DNS_R_EXTRADATA);
/* NOTREACHED */
/* FALLTHROUGH */
FALLTHROUGH;
default:
INSIST(0);
ISC_UNREACHABLE();
@ -1574,7 +1573,7 @@ xfrin_recv_done(isc_nmhandle_t *handle, isc_result_t result,
break;
case XFRST_AXFR_END:
CHECK(axfr_finalize(xfr));
/* FALLTHROUGH */
FALLTHROUGH;
case XFRST_IXFR_END:
/*
* Close the journal.

View file

@ -11307,7 +11307,7 @@ zone_maintenance(dns_zone_t *zone) {
if (zone->primaries == NULL) {
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_stub:
@ -11332,7 +11332,7 @@ zone_maintenance(dns_zone_t *zone) {
if (zone->primaries == NULL) {
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_stub:
@ -11704,7 +11704,7 @@ zone_journal_rollforward(dns_zone_t *zone, dns_db_t *db, bool *needdump,
switch (result) {
case ISC_R_SUCCESS:
*needdump = true;
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_R_UPTODATE:
if (dns_journal_recovered(journal)) {
*fixjournal = true;
@ -13639,7 +13639,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
primary, source);
goto same_primary;
}
/* fallthrough */
FALLTHROUGH;
default:
dns_zonemgr_unreachableadd(zone->zmgr, &zone->primaryaddr,
&zone->sourceaddr, &now);
@ -14049,7 +14049,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
}
goto next_primary;
}
/* fallthrough */
FALLTHROUGH;
default:
dns_zone_log(zone, ISC_LOG_INFO,
"refresh: failure trying primary "
@ -15147,8 +15147,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
if (zone->primaries != NULL) {
goto treat_as_secondary;
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_zone_primary:
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY))
@ -15211,8 +15210,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
{
next = zone->notifytime;
}
/* FALLTHROUGH */
FALLTHROUGH;
case dns_zone_stub:
if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH) &&
!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOPRIMARIES) &&
@ -17577,7 +17575,7 @@ again:
switch (xfrresult) {
case ISC_R_SUCCESS:
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_R_UPTODATE:
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FORCEXFER);
/*
@ -17735,7 +17733,6 @@ again:
zone->curprimary++;
} while (zone->curprimary < zone->primariescnt &&
zone->primariesok[zone->curprimary]);
/* FALLTHROUGH */
same_primary:
if (zone->curprimary >= zone->primariescnt) {
zone->curprimary = 0;

View file

@ -27,6 +27,18 @@
* ISC_ or isc_ to the name.
*/
/***
*** Clang Compatibility Macros
***/
#if !defined(__has_attribute)
#define __has_attribute(x) 0
#endif /* if !defined(__has_attribute) */
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif /* if !defined(__has_feature) */
/***
*** General Macros.
***/
@ -49,6 +61,14 @@
#define ISC_NONSTRING
#endif /* __GNUC__ */
#if __GNUC__ >= 7 || __has_attribute(fallthrough)
#define FALLTHROUGH __attribute__((fallthrough))
#else
/* clang-format off */
#define FALLTHROUGH do {} while (0) /* FALLTHROUGH */
/* clang-format on */
#endif
#if HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR && HAVE_FUNC_ATTRIBUTE_DESTRUCTOR
#define ISC_CONSTRUCTOR __attribute__((constructor))
#define ISC_DESTRUCTOR __attribute__((destructor))
@ -204,10 +224,6 @@
#define ISC_UNREACHABLE()
#endif /* ifdef HAVE_BUILTIN_UNREACHABLE */
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif /* if !defined(__has_feature) */
/* GCC defines __SANITIZE_ADDRESS__, so reuse the macro for clang */
#if __has_feature(address_sanitizer)
#define __SANITIZE_ADDRESS__ 1

View file

@ -688,7 +688,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
state = lexstate_vpairstart;
break;
}
/* FALLTHROUGH */
FALLTHROUGH;
case lexstate_vpairstart:
if (state == lexstate_vpairstart) {
if (c == '"' &&
@ -699,7 +699,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
}
state = lexstate_vpair;
}
/* FALLTHROUGH */
FALLTHROUGH;
case lexstate_vpair:
/*
* EOF needs to be checked before lex->specials[c]

View file

@ -1798,7 +1798,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
}
channel->flags &= ~ISC_LOG_OPENERR;
}
/* FALLTHROUGH */
FALLTHROUGH;
case ISC_LOG_TOFILEDESC:
fprintf(FILE_STREAM(channel), "%s%s%s%s%s%s%s%s%s%s\n",

View file

@ -1620,7 +1620,7 @@ isc___nmhandle_get(isc_nmsocket_t *sock, isc_sockaddr_t *peer,
if (!atomic_load(&sock->client)) {
break;
}
/* fallthrough */
FALLTHROUGH;
case isc_nm_tcpsocket:
case isc_nm_tlssocket:
INSIST(sock->statichandle == NULL);
@ -2898,7 +2898,7 @@ shutdown_walk_cb(uv_handle_t *handle, void *arg) {
isc__nmsocket_reset(sock);
return;
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
isc__nmsocket_shutdown(sock);
}

View file

@ -311,7 +311,7 @@ isc_ratelimiter_stall(isc_ratelimiter_t *rl) {
result = isc_timer_reset(rl->timer, isc_timertype_inactive,
NULL, false);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
/* FALLTHROUGH */
FALLTHROUGH;
case isc_ratelimiter_idle:
case isc_ratelimiter_stalled:
rl->state = isc_ratelimiter_stalled;

View file

@ -120,25 +120,25 @@ isc_siphash24(const uint8_t *k, const uint8_t *in, const size_t inlen,
switch (left) {
case 7:
b |= ((uint64_t)in[6]) << 48;
/* FALLTHROUGH */
FALLTHROUGH;
case 6:
b |= ((uint64_t)in[5]) << 40;
/* FALLTHROUGH */
FALLTHROUGH;
case 5:
b |= ((uint64_t)in[4]) << 32;
/* FALLTHROUGH */
FALLTHROUGH;
case 4:
b |= ((uint64_t)in[3]) << 24;
/* FALLTHROUGH */
FALLTHROUGH;
case 3:
b |= ((uint64_t)in[2]) << 16;
/* FALLTHROUGH */
FALLTHROUGH;
case 2:
b |= ((uint64_t)in[1]) << 8;
/* FALLTHROUGH */
FALLTHROUGH;
case 1:
b |= ((uint64_t)in[0]);
/* FALLTHROUGH */
FALLTHROUGH;
case 0:
break;
default:
@ -198,13 +198,13 @@ isc_halfsiphash24(const uint8_t *k, const uint8_t *in, const size_t inlen,
switch (left) {
case 3:
b |= ((uint32_t)in[2]) << 16;
/* FALLTHROUGH */
FALLTHROUGH;
case 2:
b |= ((uint32_t)in[1]) << 8;
/* FALLTHROUGH */
FALLTHROUGH;
case 1:
b |= ((uint32_t)in[0]);
/* FALLTHROUGH */
FALLTHROUGH;
case 0:
break;
default:

View file

@ -322,7 +322,7 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
case 'k': /* The hour (24-hour clock representation). */
LEGAL_ALT(0);
/* FALLTHROUGH */
FALLTHROUGH;
case 'H':
LEGAL_ALT(ALT_O);
if (!(conv_num(&bp, &tm->tm_hour, 0, 23))) {
@ -332,7 +332,7 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
case 'l': /* The hour (12-hour clock representation). */
LEGAL_ALT(0);
/* FALLTHROUGH */
FALLTHROUGH;
case 'I':
LEGAL_ALT(ALT_O);
if (!(conv_num(&bp, &tm->tm_hour, 1, 12))) {

View file

@ -277,7 +277,7 @@ parse_url_char(state_t s, const char ch) {
return (s_dead);
}
/* FALLTHROUGH */
FALLTHROUGH;
case s_req_server_start:
case s_req_server:
if (ch == '/') {
@ -399,7 +399,7 @@ http_parse_host_char(host_state_t s, const char ch) {
return (s_http_host);
}
/* FALLTHROUGH */
FALLTHROUGH;
case s_http_host_v6_end:
if (ch == ':') {
return (s_http_host_port_start);
@ -412,7 +412,7 @@ http_parse_host_char(host_state_t s, const char ch) {
return (s_http_host_v6_end);
}
/* FALLTHROUGH */
FALLTHROUGH;
case s_http_host_v6_start:
if (isxdigit((unsigned char)ch) || ch == ':' || ch == '.') {
return (s_http_host_v6);
@ -428,7 +428,7 @@ http_parse_host_char(host_state_t s, const char ch) {
return (s_http_host_v6_end);
}
/* FALLTHROUGH */
FALLTHROUGH;
case s_http_host_v6_zone_start:
/* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */
if (isalnum((unsigned char)ch) || ch == '%' || ch == '.' ||
@ -578,7 +578,7 @@ isc_url_parse(const char *buf, size_t buflen, bool is_connect,
case s_req_server_with_at:
found_at = 1;
/* FALLTHROUGH */
FALLTHROUGH;
case s_req_server:
uf = ISC_UF_HOST;
break;

View file

@ -426,8 +426,8 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) {
if (ctx->geoip->country != NULL) {
return (true);
}
/* city db can answer these too, so: */
/* FALLTHROUGH */
/* city db can answer these too, so: */
FALLTHROUGH;
case dns_geoip_region:
case dns_geoip_regionname:
case dns_geoip_city_countrycode:

View file

@ -2566,7 +2566,7 @@ query_prefetch(ns_client_t *client, dns_name_t *qname,
break;
case ISC_R_SOFTQUOTA:
isc_quota_detach(&client->recursionquota);
/* FALLTHROUGH */
FALLTHROUGH;
default:
return;
}
@ -2784,7 +2784,7 @@ query_rpzfetch(ns_client_t *client, dns_name_t *qname, dns_rdatatype_t type) {
break;
case ISC_R_SOFTQUOTA:
isc_quota_detach(&client->recursionquota);
/* FALLTHROUGH */
FALLTHROUGH;
default:
return;
}
@ -7247,7 +7247,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
break;
case DNS_RPZ_POLICY_NODATA:
qctx->nxrewrite = true;
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_RPZ_POLICY_DNS64:
result = DNS_R_NXRRSET;
qctx->rpz = true;
@ -10159,7 +10159,7 @@ query_coveringnsec(query_ctx_t *qctx) {
{
goto cleanup;
}
/* FALLTHROUGH */
FALLTHROUGH;
case DNS_R_CNAME:
if (!qctx->resuming && !STALE(&rdataset) && rdataset.ttl == 0 &&
RECURSIONOK(qctx->client))