1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 17:18:48 -05:00

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

View File

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