From 5b10eaba7a575e9f97df084bf7fb5e592c1b372f Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 11 Oct 2012 22:55:14 -0600 Subject: [PATCH] Windows: fix error: variable 'h_error' set but not used --- compat/getnameinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/getnameinfo.c b/compat/getnameinfo.c index 194fd03277..aa8716c607 100644 --- a/compat/getnameinfo.c +++ b/compat/getnameinfo.c @@ -158,7 +158,6 @@ int flags; int family, i; const char *addr; uint32_t v4a; - int h_error; char numserv[512]; if (sa == NULL) @@ -260,14 +259,17 @@ found: goto numeric; } else { #if USE_GETIPNODEBY + int h_error = 0; hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error); #else hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af); +#if 0 // getnameinfo.c:161:9: error: variable 'h_error' set but not used #if HAVE_H_ERRNO h_error = h_errno; #else h_error = EINVAL; #endif +#endif /* 0 */ #endif if (hp) { -- 2.47.3