mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
url: silence MSVC warning
Since commit f3d501dc67
, if proxy support is disabled, MSVC warns:
url.c : warning C4701: potentially uninitialized local variable
'hostaddr' used
url.c : error C4703: potentially uninitialized local pointer variable
'hostaddr' used
That could actually only happen if both `conn->bits.proxy` and
`CURL_DISABLE_PROXY` were enabled.
Initialize it to NULL to silence the warning.
Closes https://github.com/curl/curl/pull/5638
This commit is contained in:
parent
01afe4e1af
commit
19b96ba385
@ -3170,7 +3170,7 @@ static CURLcode resolve_server(struct Curl_easy *data,
|
|||||||
else {
|
else {
|
||||||
/* this is a fresh connect */
|
/* this is a fresh connect */
|
||||||
int rc;
|
int rc;
|
||||||
struct Curl_dns_entry *hostaddr;
|
struct Curl_dns_entry *hostaddr = NULL;
|
||||||
|
|
||||||
#ifdef USE_UNIX_SOCKETS
|
#ifdef USE_UNIX_SOCKETS
|
||||||
if(conn->unix_domain_socket) {
|
if(conn->unix_domain_socket) {
|
||||||
|
Loading…
Reference in New Issue
Block a user