From: Aydın Mercan Date: Wed, 7 Feb 2024 08:35:59 +0000 (+0300) Subject: Add fallback to ns_client_get_type despite unreachable X-Git-Tag: v9.19.24~9^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5478654a2960de096a3712f2994e541ebeedc6f;p=thirdparty%2Fbind9.git Add fallback to ns_client_get_type despite unreachable GCC might fail to compile because it expects a return after UNREACHABLE. It should ideally just work anyway since UNREACHABLE is either a noreturn or UB (__builtin_unreachable / C23 unreachable). Either way, it should be optimized almost always so the fallback is free or basically free anyway when it isn't optimized out. --- diff --git a/lib/ns/client.c b/lib/ns/client.c index b129db00c37..04447397af7 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -155,6 +155,8 @@ ns_client_transport_type(const ns_client_t *client) { case isc_nm_nonesocket: UNREACHABLE(); } + + return DNS_TRANSPORT_UDP; } void