From: Yang Tse Date: Mon, 29 Jan 2007 20:56:27 +0000 (+0000) Subject: fix compiler warning "discards qualifiers from pointer target type" in debug builds X-Git-Tag: upstream/7.37.1~9616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db22c8303119f8d91c4988471f0bb169071940b2;p=platform%2Fupstream%2Fcurl.git fix compiler warning "discards qualifiers from pointer target type" in debug builds --- diff --git a/ares/ares_free_hostent.c b/ares/ares_free_hostent.c index c524281..7763df7 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 f675c51..00d7886 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 73e537a..71cf41d 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 */