Commit d47c42a0 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 8012cef1
Pipeline #46722 passed with stages
in 32 minutes and 29 seconds
......@@ -18,6 +18,7 @@
#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) {
......@@ -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);
......
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