aboutsummaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-10-09 13:32:20 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2017-10-09 13:46:44 +0200
commit41c0a13fe7455bbdd3aa785a67ded91058f81333 (patch)
tree9c62b91c82970e6a475b9b03c66cd8f1652bee46 /uri.c
parent5af594d8bc55121ae454cba4d05793d1db7ff612 (diff)
downloadlibxml2-41c0a13fe7455bbdd3aa785a67ded91058f81333.tar.gz
Fix Windows compiler warnings in xmlCanonicPath
The code handling Windows paths assigned some char/xmlChar pointers without explicit casts. Also remove an unused variable.
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/uri.c b/uri.c
index 62bedd18..84e420a0 100644
--- a/uri.c
+++ b/uri.c
@@ -2394,8 +2394,7 @@ xmlCanonicPath(const xmlChar *path)
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
int len = 0;
- int i = 0;
- xmlChar *p = NULL;
+ char *p = NULL;
#endif
xmlURIPtr uri;
xmlChar *ret;
@@ -2477,7 +2476,7 @@ path_processing:
len = xmlStrlen(path);
if ((len > 2) && IS_WINDOWS_PATH(path)) {
/* make the scheme 'file' */
- uri->scheme = xmlStrdup(BAD_CAST "file");
+ uri->scheme = (char *) xmlStrdup(BAD_CAST "file");
/* allocate space for leading '/' + path + string terminator */
uri->path = xmlMallocAtomic(len + 2);
if (uri->path == NULL) {
@@ -2487,9 +2486,9 @@ path_processing:
/* Put in leading '/' plus path */
uri->path[0] = '/';
p = uri->path + 1;
- strncpy(p, path, len + 1);
+ strncpy(p, (char *) path, len + 1);
} else {
- uri->path = xmlStrdup(path);
+ uri->path = (char *) xmlStrdup(path);
if (uri->path == NULL) {
xmlFreeURI(uri);
return(NULL);