]> granicus.if.org Git - curl/commitdiff
urlapi: fix unused variable warning
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 30 Sep 2019 22:26:03 +0000 (00:26 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Tue, 1 Oct 2019 08:47:41 +0000 (10:47 +0200)
`dest` is only used with `ENABLE_IPV6`.

Closes https://github.com/curl/curl/pull/4444

lib/urlapi.c

index a5142840457b2708c7952d3da5890a8993be6729..1c13077ec008605faa44e03390676f1ffe4687c2 100644 (file)
@@ -596,7 +596,9 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname)
   size_t hlen = strlen(hostname);
 
   if(hostname[0] == '[') {
+#ifdef ENABLE_IPV6
     char dest[16]; /* fits a binary IPv6 address */
+#endif
     const char *l = "0123456789abcdefABCDEF:.";
     if(hlen < 5) /* '[::1]' is the shortest possible valid string */
       return CURLUE_MALFORMED_INPUT;