Commit 4f25e8ee authored by Mark Andrews's avatar Mark Andrews

Mark 'addr' as unused if HAVE_IF_NAMETOINDEX is not defined

Also 'zone' should be initialised to zero.

(cherry picked from commit e7662c4c)
parent f34bab41
Pipeline #46723 passed with stages
in 48 minutes and 23 seconds
......@@ -13,10 +13,11 @@
#include <config.h>
#include <isc/string.h>
#include <isc/net.h>
#include <isc/netscope.h>
#include <isc/result.h>
#include <isc/string.h>
#include <isc/util.h>
isc_result_t
isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) {
......@@ -24,10 +25,14 @@ isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) {
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
unsigned int ifid;
struct in6_addr *in6;
#endif
uint32_t zone;
#endif /* ifdef HAVE_IF_NAMETOINDEX */
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment