]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1091: compile fails with warnings with --disable-internal-dns
authorhno <>
Sat, 16 Oct 2004 03:12:47 +0000 (03:12 +0000)
committerhno <>
Sat, 16 Oct 2004 03:12:47 +0000 (03:12 +0000)
Patch by Guido.

src/dnsserver.cc
src/ipcache.cc

index c7919790c905c6eb5b5bfcc2cc092c3b0728b85b..4f68db915ec21a2ac3b40415cdbf522c96d58839 100644 (file)
@@ -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
index d2e76cea0f0eb0598cc0612e5fe40b0bb16dcce3..61166ff259264997d9f34fdaa078ccf6bc857e84 100644 (file)
@@ -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]))