diff options
author | Marian Klymov <nekto1989@gmail.com> | 2018-06-02 23:52:56 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-11 11:14:48 +0200 |
commit | c45360d4633850839bb9c2d77dbf8a8285e9ad49 (patch) | |
tree | 20159c553a74ed98c2431fc8f2852067f79ac4e9 /lib/url.c | |
parent | 38203f1585da53e07e54e37c7d5da4d72f509a2e (diff) | |
download | curl-c45360d4633850839bb9c2d77dbf8a8285e9ad49.tar.gz |
cppcheck: fix warnings
- Get rid of variable that was generating false positive warning
(unitialized)
- Fix issues in tests
- Reduce scope of several variables all over
etc
Closes #2631
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -2003,7 +2003,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, char *fragment; char *path = data->state.path; char *query; - int i; int rc; const char *protop = ""; CURLcode result; @@ -2055,6 +2054,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, ; /* do nothing */ } else { /* check for a scheme */ + int i; for(i = 0; i < 16 && data->change.url[i]; ++i) { if(data->change.url[i] == '/') break; @@ -2543,14 +2543,13 @@ static bool check_noproxy(const char *name, const char *no_proxy) * not be proxied, or an asterisk to override * all proxy variables) */ - size_t tok_start; - size_t tok_end; - const char *separator = ", "; - size_t no_proxy_len; - size_t namelen; - char *endptr; - if(no_proxy && no_proxy[0]) { + size_t tok_start; + size_t tok_end; + const char *separator = ", "; + size_t no_proxy_len; + size_t namelen; + char *endptr; if(strcasecompare("*", no_proxy)) { return TRUE; } |