aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-01-29 20:56:27 +0000
committerYang Tse <yangsita@gmail.com>2007-01-29 20:56:27 +0000
commitdb22c8303119f8d91c4988471f0bb169071940b2 (patch)
tree091479d8a2a61f21606324cbfe73826ba2b0fc2c /ares
parenta4b39c6ab8d5cbfa0f674eff54826177076bbe0a (diff)
fix compiler warning "discards qualifiers from pointer target type" in debug builds
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_free_hostent.c2
-rw-r--r--ares/ares_gethostbyname.c2
-rw-r--r--ares/ares_getnameinfo.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/ares/ares_free_hostent.c b/ares/ares_free_hostent.c
index c52428109..7763df7dc 100644
--- a/ares/ares_free_hostent.c
+++ b/ares/ares_free_hostent.c
@@ -29,7 +29,7 @@ void ares_free_hostent(struct hostent *host)
{
char **p;
- free(host->h_name);
+ free((char *)(host->h_name));
for (p = host->h_aliases; *p; p++)
free(*p);
free(host->h_aliases);
diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c
index f675c51a9..00d78861d 100644
--- a/ares/ares_gethostbyname.c
+++ b/ares/ares_gethostbyname.c
@@ -239,7 +239,7 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
hostent.h_addr_list = addrs;
callback(arg, ARES_SUCCESS, &hostent);
- free(hostent.h_name);
+ free((char *)(hostent.h_name));
return 1;
}
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c
index 73e537a87..71cf41d50 100644
--- a/ares/ares_getnameinfo.c
+++ b/ares/ares_getnameinfo.c
@@ -220,7 +220,8 @@ static void nameinfo_callback(void *arg, int status, struct hostent *host)
*end = 0;
}
}
- niquery->callback(niquery->arg, ARES_SUCCESS, host->h_name, service);
+ niquery->callback(niquery->arg, ARES_SUCCESS, (char *)(host->h_name),
+ service);
return;
}
/* We couldn't find the host, but it's OK, we can use the IP */