urlapi: fix unused variable warning

`dest` is only used with `ENABLE_IPV6`.

Closes https://github.com/curl/curl/pull/4444
This commit is contained in:
Marcel Raad 2019-10-01 00:26:03 +02:00
parent 69d95b6d4c
commit 0f62c9af8b
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02
1 changed files with 2 additions and 0 deletions

View 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;