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