From: Mark Andrews Date: Thu, 9 Jul 2020 05:04:31 +0000 (+1000) Subject: Mark 'addr' as unused if HAVE_IF_NAMETOINDEX is not defined X-Git-Tag: v9.17.4~48^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7662c4c6347648e95606338ce98f360e5afb5a7;p=thirdparty%2Fbind9.git Mark 'addr' as unused if HAVE_IF_NAMETOINDEX is not defined Also 'zone' should be initialised to zero. --- diff --git a/lib/isc/netscope.c b/lib/isc/netscope.c index bca2d13801a..68a0a8dc147 100644 --- a/lib/isc/netscope.c +++ b/lib/isc/netscope.c @@ -18,6 +18,7 @@ #include #include #include +#include isc_result_t isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { @@ -26,9 +27,13 @@ isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { unsigned int ifid; struct in6_addr *in6; #endif /* ifdef HAVE_IF_NAMETOINDEX */ - uint32_t zone; + uint32_t zone = 0; uint64_t llz; +#ifndef HAVE_IF_NAMETOINDEX + UNUSED(addr); +#endif + /* at this moment, we only support AF_INET6 */ if (af != AF_INET6) { return (ISC_R_FAILURE);