aboutsummaryrefslogtreecommitdiff
path: root/src/core/url.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-02-14 14:50:04 -0800
committerGarrett D'Amore <garrett@damore.org>2018-02-14 18:28:36 -0800
commit45bc175ef9278c175d2fc3a0678b49b18e74c449 (patch)
treeb1838778ee898112f28b35178364068c6f48c9b4 /src/core/url.c
parent8f93750ed2a6aaa1749eb689ddf119280f9aac7a (diff)
downloadnng-45bc175ef9278c175d2fc3a0678b49b18e74c449.tar.gz
nng-45bc175ef9278c175d2fc3a0678b49b18e74c449.tar.bz2
nng-45bc175ef9278c175d2fc3a0678b49b18e74c449.zip
fixes #234 Investigate enabling more verbose compiler warnings
We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need.
Diffstat (limited to 'src/core/url.c')
-rw-r--r--src/core/url.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/url.c b/src/core/url.c
index 2cdb43c2..93f1298e 100644
--- a/src/core/url.c
+++ b/src/core/url.c
@@ -127,8 +127,8 @@ url_canonify_uri(char **outp, const char *in)
out[dst++] = (char) c;
} else {
out[dst++] = '%';
- out[dst++] = toupper(out[src + 1]);
- out[dst++] = toupper(out[src + 2]);
+ out[dst++] = (char) toupper(out[src + 1]);
+ out[dst++] = (char) toupper(out[src + 2]);
}
src += 3;
continue;
@@ -152,7 +152,7 @@ url_canonify_uri(char **outp, const char *in)
if ((c == '?') || (c == '#')) {
skip = true;
}
- out[dst++] = c;
+ out[dst++] = (char) c;
src++;
}
out[dst] = 0;
@@ -186,7 +186,7 @@ url_canonify_uri(char **outp, const char *in)
if ((c == '?') || (c == '#')) {
skip = true;
}
- out[dst++] = c;
+ out[dst++] = (char) c;
src++;
}
}
@@ -285,7 +285,7 @@ nni_url_parse(nni_url **urlp, const char *raw)
goto error;
}
for (size_t i = 0; i < len; i++) {
- url->u_scheme[i] = tolower(s[i]);
+ url->u_scheme[i] = (char) tolower(s[i]);
}
url->u_scheme[len] = '\0';
@@ -335,7 +335,7 @@ nni_url_parse(nni_url **urlp, const char *raw)
// Copy the host portion, but make it lower case (hostnames are
// case insensitive).
for (size_t i = 0; i < len; i++) {
- url->u_host[i] = tolower(s[i]);
+ url->u_host[i] = (char) tolower(s[i]);
}
url->u_host[len] = '\0';
s += len;