cURL / Mailing Lists / curl-library / Single Mail

curl-library

VC9 libcurl compiler warnings (64 bit only)

From: Adam Light <aclight_at_gmail.com>
Date: Fri, 23 Jul 2010 18:17:51 -0700

Hi

I've compiled libcurl on Windows using Visual Studio 2008 (VC9). The
build target is x64 (64 bit).

I get four compiler warnings:

#1:
connect.c(1084) : warning C4244: '=' : conversion from 'curl_socket_t'
to 'long', possible loss of data
This seems to be a problem because curl_socket_t is defined as UINT_PTR and
UINT_PTR is defined, in x64, as: typedef unsigned __int64 UINT_PTR

If param_longp is holding a pointer, which it appears to be doing, it
needs to be large enough to actually hold the pointer.

#2-4:
curl_addrinfo.c(154) : warning C4267: '=' : conversion from 'size_t'
to 'curl_socklen_t', possible loss of data
file.c(556) : warning C4267: 'function' : conversion from 'size_t' to
'unsigned int', possible loss of data
http.c(1072) : warning C4244: '+=' : conversion from '__int64' to
'long', possible loss of data

These look like they are less of a problem since the conversion would
only cause loss of data in cases where large amounts of data are being
transferred.

Thanks
Adam
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-24