aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-01 00:26:03 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-01 10:47:41 +0200
commit0f62c9af8bc24245a352363d614b8cf848a43e06 (patch)
tree0ea8ecc11bdd1a9c1dabeb4f14ad9f8d324e01e3
parent69d95b6d4c3dce64e58bd36d998ee10ae4da0f34 (diff)
urlapi: fix unused variable warning
`dest` is only used with `ENABLE_IPV6`. Closes https://github.com/curl/curl/pull/4444
-rw-r--r--lib/urlapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index a51428404..1c13077ec 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -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;