Skip to content
Snippets Groups Projects
Commit 2f0c1185 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

warning: silence a win64 compiler warning

conversion from 'size_t' to 'curl_socklen_t', possible loss of data

Reported by: Adam Light
parent 53e47ca9
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment