1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

warning: silence a win64 compiler warning

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

Reported by: Adam Light
This commit is contained in:
Daniel Stenberg 2010-07-30 23:19:08 +02:00
parent 53e47ca947
commit 2f0c118577

View File

@ -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);