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/dict.c | |
parent | 38203f1585da53e07e54e37c7d5da4d72f509a2e (diff) |
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/dict.c')
-rw-r--r-- | lib/dict.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dict.c b/lib/dict.c index 4fc85521d..c26d6d34c 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -95,10 +95,7 @@ static char *unescape_word(struct Curl_easy *data, const char *inputbuff) { char *newp = NULL; char *dictp; - char *ptr; size_t len; - char ch; - int olen = 0; CURLcode result = Curl_urldecode(data, inputbuff, 0, &newp, &len, FALSE); if(!newp || result) @@ -106,6 +103,9 @@ static char *unescape_word(struct Curl_easy *data, const char *inputbuff) dictp = malloc(((size_t)len)*2 + 1); /* add one for terminating zero */ if(dictp) { + char *ptr; + char ch; + int olen = 0; /* According to RFC2229 section 2.2, these letters need to be escaped with \[letter] */ for(ptr = newp; |