From: Daniel Gustafsson Date: Wed, 19 Sep 2018 11:44:10 +0000 (+0200) Subject: urlapi: don't set value which is never read X-Git-Tag: curl-7_62_0~165 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=522e647cc52c45ebdb58d57f242204f9a72c45dd;p=thirdparty%2Fcurl.git urlapi: don't set value which is never read 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 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index 0ac5507414..f6d911667a 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -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,