From b5478654a2960de096a3712f2994e541ebeedc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ayd=C4=B1n=20Mercan?= Date: Wed, 7 Feb 2024 11:35:59 +0300 Subject: [PATCH] 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. --- lib/ns/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ns/client.c b/lib/ns/client.c index b129db00c3..04447397af 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