From: hno <> Date: Sat, 16 Oct 2004 03:12:47 +0000 (+0000) Subject: Bug #1091: compile fails with warnings with --disable-internal-dns X-Git-Tag: SQUID_3_0_PRE4~1020 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c48b9cc7b702889b28180e3626c35b0b9b2e851e;p=thirdparty%2Fsquid.git Bug #1091: compile fails with warnings with --disable-internal-dns Patch by Guido. --- diff --git a/src/dnsserver.cc b/src/dnsserver.cc index c7919790c9..4f68db915e 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -1,6 +1,6 @@ /* - * $Id: dnsserver.cc,v 1.64 2003/02/21 22:50:08 robertc Exp $ + * $Id: dnsserver.cc,v 1.65 2004/10/15 21:12:47 hno Exp $ * * DEBUG: section 0 DNS Resolver * AUTHOR: Harvest Derived @@ -175,15 +175,15 @@ static char * my_h_msgs(int x) { if (x == HOST_NOT_FOUND) - return "Host not found (authoritative)"; + return (char *)"Host not found (authoritative)"; else if (x == TRY_AGAIN) - return "Host not found (non-authoritative)"; + return (char *)"Host not found (non-authoritative)"; else if (x == NO_RECOVERY) - return "Non recoverable errors"; + return (char *)"Non recoverable errors"; else if (x == NO_DATA || x == NO_ADDRESS) - return "Valid name, no data record of requested type"; + return (char *)"Valid name, no data record of requested type"; else - return "Unknown DNS problem"; + return (char *)"Unknown DNS problem"; } #define REQ_SZ 512 diff --git a/src/ipcache.cc b/src/ipcache.cc index d2e76cea0f..61166ff259 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.244 2004/04/10 13:10:17 hno Exp $ + * $Id: ipcache.cc,v 1.245 2004/10/15 21:12:47 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -332,8 +332,8 @@ ipcacheParse(ipcache_entry *i, const char *inbuf) if (ipcount > 0) { int j, k; - i->addrs.in_addrs = xcalloc(ipcount, sizeof(struct in_addr)); - i->addrs.bad_mask = xcalloc(ipcount, sizeof(unsigned char)); + i->addrs.in_addrs = (struct in_addr *)xcalloc(ipcount, sizeof(struct in_addr)); + i->addrs.bad_mask = (unsigned char *)xcalloc(ipcount, sizeof(unsigned char)); for (j = 0, k = 0; k < ipcount; k++) { if (safe_inet_addr(A[k], &i->addrs.in_addrs[j]))