mirror of
https://github.com/moparisthebest/curl
synced 2024-12-25 09:38:54 -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:
parent
69d95b6d4c
commit
0f62c9af8b
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user