]> sjero.net Git - wget/blobdiff - src/http.c
Henri's -Wall patch.
[wget] / src / http.c
index 11dc9cc8f7d08c2678e09a486f135e21118e16de..58e9b14a94453ff5477b745a779be2d1411595d3 100644 (file)
@@ -2908,7 +2908,7 @@ http_atotm (const char *time_string)
                                    Netscape cookie specification.) */
   };
   const char *oldlocale;
-  int i;
+  size_t i;
   time_t ret = (time_t) -1;
 
   /* Solaris strptime fails to recognize English month names in
@@ -3019,10 +3019,11 @@ digest_authentication_encode (const char *au, const char *user,
   au += 6;                      /* skip over `Digest' */
   while (extract_param (&au, &name, &value, ','))
     {
-      int i;
+      size_t i;
       for (i = 0; i < countof (options); i++)
-        if (name.e - name.b == strlen (options[i].name)
-            && 0 == strncmp (name.b, options[i].name, name.e - name.b))
+        if ((size_t) (name.e - name.b) == strlen (options[i].name)
+            && 0 == strncmp (name.b, options[i].name,
+                             (size_t) (name.e - name.b)))
           {
             *options[i].variable = strdupdelim (value.b, value.e);
             break;
@@ -3102,7 +3103,7 @@ username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\"",
    first argument and are followed by whitespace or terminating \0.
    The comparison is case-insensitive.  */
 #define STARTS(literal, b, e)                           \
-  ((e) - (b) >= STRSIZE (literal)                       \
+  (((size_t) ((e) - (b))) >= STRSIZE (literal) \
    && 0 == strncasecmp (b, literal, STRSIZE (literal))  \
    && ((e) - (b) == STRSIZE (literal)                   \
        || c_isspace (b[STRSIZE (literal)])))