summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2020-07-02 13:23:31 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2020-07-02 13:31:22 +0200
commit19b96ba38501fd816930546cb26d55b6f31aa26f (patch)
tree4ddce3062f59cc59f12b2c10015163303e947c72 /lib
parent01afe4e1af4de7f85d8ad7757bed6bd0c5b6b754 (diff)
downloadcurl-19b96ba38501fd816930546cb26d55b6f31aa26f.tar.gz
url: silence MSVC warning
Since commit f3d501dc678, 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
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index a1a6b6910..caeb429a5 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3170,7 +3170,7 @@ static CURLcode resolve_server(struct Curl_easy *data,
else {
/* this is a fresh connect */
int rc;
- struct Curl_dns_entry *hostaddr;
+ struct Curl_dns_entry *hostaddr = NULL;
#ifdef USE_UNIX_SOCKETS
if(conn->unix_domain_socket) {