]> sjero.net Git - wget/blobdiff - src/url.c
Merge with mainline.
[wget] / src / url.c
index 86d099a7190b80aaec8bc1cf6771c49892364602..4c22a9fc6e460c5d34cc63ac81f0d6d3ca69c453 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -668,7 +668,8 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
   int port;
   char *user = NULL, *passwd = NULL;
 
-  char *url_encoded = NULL, *new_url = NULL;
+  const char *url_encoded = NULL;
+  char *new_url = NULL;
 
   int error_code;
 
@@ -904,7 +905,7 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
       if (url_encoded == url)
         u->url = xstrdup (url);
       else
-        u->url = url_encoded;
+        u->url = (char *) url_encoded;
     }
 
   return u;
@@ -912,7 +913,7 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
  error:
   /* Cleanup in case of error: */
   if (url_encoded && url_encoded != url)
-    xfree (url_encoded);
+    xfree ((char *) url_encoded);
 
   /* Transmit the error code to the caller, if the caller wants to
      know.  */