1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

Fix unused variable warnings in nanohttp.c

Some variables are only used if certain macros are set. Move the
declarations around.
This commit is contained in:
Nick Wellnhofer 2017-10-09 02:01:00 +02:00
parent e3890546d7
commit ecbdfa9eb3

View File

@ -1045,16 +1045,13 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
static SOCKET
xmlNanoHTTPConnectHost(const char *host, int port)
{
struct hostent *h;
struct sockaddr *addr = NULL;
struct in_addr ia;
struct sockaddr_in sockin;
#ifdef SUPPORT_IP6
struct in6_addr ia6;
struct sockaddr_in6 sockin6;
#endif
int i;
SOCKET s;
memset (&sockin, 0, sizeof(sockin));
@ -1129,6 +1126,10 @@ xmlNanoHTTPConnectHost(const char *host, int port)
#endif
#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
{
struct hostent *h;
struct in_addr ia;
int i;
h = gethostbyname (GETHOSTBYNAME_ARG_CAST host);
if (h == NULL) {