diff options
author | Daniel Stenberg <daniel@haxx.se> | 2010-07-30 23:19:08 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-07-30 23:19:47 +0200 |
commit | 2f0c1185776f3483cb042c699dc52f5a4662079e (patch) | |
tree | 39a54f9184f7f26ccd92c2eab5b0db617930ca97 /lib/curl_addrinfo.c | |
parent | 53e47ca947312981fd5773bb618aa5e5b1f2e1e3 (diff) | |
download | curl-2f0c1185776f3483cb042c699dc52f5a4662079e.tar.gz |
warning: silence a win64 compiler warning
conversion from 'size_t' to 'curl_socklen_t', possible loss of data
Reported by: Adam Light
Diffstat (limited to 'lib/curl_addrinfo.c')
-rw-r--r-- | lib/curl_addrinfo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index c38a1ed25..5098fa431 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -151,7 +151,10 @@ Curl_getaddrinfo_ex(const char *nodename, ca->ai_next = NULL; if((ai->ai_addrlen > 0) && (ai->ai_addr != NULL)) { - ca->ai_addrlen = ai->ai_addrlen; + /* typecast below avoid warning on at least win64: + conversion from 'size_t' to 'curl_socklen_t', possible loss of data + */ + ca->ai_addrlen = (curl_socklen_t)ai->ai_addrlen; if((ca->ai_addr = malloc(ca->ai_addrlen)) == NULL) { error = EAI_MEMORY; free(ca); |