Merge branch '1994-netscope-c-23-50-error-unused-parameter-addr-when-have_if_nametoindex-undefined-on-illumos' into 'main'

Resolve "netscope.c:23:50: error: unused parameter 'addr' when HAVE_IF_NAMETOINDEX undefined on illumos"

Closes #1994

See merge request isc-projects/bind9!3829
This commit is contained in:
Mark Andrews 2020-07-14 00:51:22 +00:00
commit 2ac2d83265

View file

@ -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);