]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: fix error: variable 'h_error' set but not used
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 12 Oct 2012 04:55:14 +0000 (22:55 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 12 Oct 2012 04:55:14 +0000 (22:55 -0600)
compat/getnameinfo.c

index 194fd03277c03a5175db82ba1a694d00c6f0a540..aa8716c6077195e48e39aeb6c7e370b03761db2a 100644 (file)
@@ -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) {