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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user