]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Some warning fixes
authorhno <>
Thu, 18 Oct 2001 01:46:43 +0000 (01:46 +0000)
committerhno <>
Thu, 18 Oct 2001 01:46:43 +0000 (01:46 +0000)
lib/html_quote.c
lib/rfc1123.c
lib/util.c

index 152739427610d60d2fe9bcab66b358f71176ef90..43c4aa6a664382305db985b7c174272b23b9aa65 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: html_quote.c,v 1.3 2001/01/12 00:37:12 wessels Exp $
+ * $Id: html_quote.c,v 1.4 2001/10/17 19:46:43 hno Exp $
  * 
  * DEBUG:
  * AUTHOR: Robert Collins
@@ -49,7 +49,7 @@
  */
 static struct {
     unsigned char code;
-    char *quote;
+    const char *quote;
 } htmlstandardentities[] =
 
 {
@@ -98,7 +98,7 @@ html_quote(const char *string)
        buf = xcalloc(bufsize, 1);
     }
     for (src = string, dst = buf; *src; src++) {
-       char *escape = NULL;
+       const char *escape = NULL;
        const unsigned char ch = *src;
 
        /* Walk thru the list of HTML Entities that must be quoted to
index f3d42364a0a896b33efb75ab0ea54c5d2675d1bc..54db1a70ae3ba313a3d24182d41dcace86a4d1fb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.28 2001/01/12 00:37:13 wessels Exp $
+ * $Id: rfc1123.c,v 1.29 2001/10/17 19:46:43 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -74,7 +74,7 @@ static const char *const w_space = " \t\r\n";
 static int make_month(const char *s);
 static int make_num(const char *s);
 
-static char *month_names[12] =
+static const char *month_names[12] =
 {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
index 96a50bd99e21cdb8e827b9e1c621b5118db4fe07..c0a310edfa6615825288ad59d2a64cc876a843ac 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.81 2001/10/17 12:41:48 hno Exp $
+ * $Id: util.c,v 1.82 2001/10/17 19:46:43 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -725,12 +725,14 @@ xpercent(double part, double whole)
 int
 xpercentInt(double part, double whole)
 {
+    double result;
 #if HAVE_RINT
-    return (int) rint(xpercent(part, whole));
+    result = rint(xpercent(part, whole));
 #else
     /* SCO 3.2v4.2 doesn't have rint() -- mauri@mbp.ee */
-    return (int) floor(xpercent(part, whole) + 0.5);
+    result = floor(xpercent(part, whole) + 0.5);
 #endif
+    return (int) result;
 }
 
 /* somewhat safer division */
@@ -751,9 +753,9 @@ xitoa(int num)
 
 /* A default failure notifier when the main program hasn't installed any */
 void
-default_failure_notify(const char *msg)
+default_failure_notify(const char *message)
 {
-    write(2, msg, strlen(msg));
+    write(2, message, strlen(message));
     write(2, "\n", 1);
     abort();
 }