]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: remove two variable assigns
authorDaniel Stenberg <daniel@haxx.se>
Fri, 21 Oct 2022 07:41:54 +0000 (09:41 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 21 Oct 2022 09:00:18 +0000 (11:00 +0200)
To please scan-build:

urlapi.c:1163:9: warning: Value stored to 'qlen' is never read
        qlen = Curl_dyn_len(&enc);
        ^      ~~~~~~~~~~~~~~~~~~
urlapi.c:1164:9: warning: Value stored to 'query' is never read
        query = u->query = Curl_dyn_ptr(&enc);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Follow-up to 7d6cf06f571d57

Closes #9777

lib/urlapi.c

index 66cc87707f9ae89429401dfbb0a32e19486ec039..7dac81c85c8c15d64b08dccbc0b6aea82fcda1a8 100644 (file)
@@ -1160,8 +1160,7 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags)
           result = CURLUE_OUT_OF_MEMORY;
           goto fail;
         }
-        qlen = Curl_dyn_len(&enc);
-        query = u->query = Curl_dyn_ptr(&enc);
+        u->query = Curl_dyn_ptr(&enc);
       }
       else {
         u->query = Curl_memdup(query + 1, qlen);