]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: don't set value which is never read
authorDaniel Gustafsson <daniel@yesql.se>
Wed, 19 Sep 2018 11:44:10 +0000 (13:44 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Wed, 19 Sep 2018 11:44:10 +0000 (13:44 +0200)
In the CURLUPART_URL case, there is no codepath which invokes url
decoding so remove the assignment of the urldecode variable. This
fixes the deadstore bug-report from clang static analysis.

Closes #3015
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/urlapi.c

index 0ac550741437386309e9a2feb072b968ee741440..f6d911667a5bf84047eba2f7d424cb4f78e08b22 100644 (file)
@@ -970,7 +970,6 @@ CURLUcode curl_url_get(CURLU *u, CURLUPart what,
     char *scheme;
     char *options = u->options;
     char *port = u->port;
-    urldecode = FALSE; /* not for the whole thing */
     if(u->scheme && strcasecompare("file", u->scheme)) {
       url = aprintf("file://%s%s%s",
                     u->path,