cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 7.21.4: Win32 warning C4244 in transfer.c line 553 introduced

From: Stefan Krause <stefan.krause_at_gmx.net>
Date: Fri, 04 Mar 2011 20:55:04 +0100

On 02/24/2011 10:15 PM, Kamil Dudka wrote:
> On Thursday 24 February 2011 09:24:18 Daniel Stenberg wrote:
>> On Wed, 23 Feb 2011, Kamil Dudka wrote:
>>> Thank you for the report. Does the attached patch solve the problem?
>> I think it is a step in the right direction, but it shows we have another
>> generic win64 problem:
>>
>> time_t is 64bit, long is 32bit [*]
>>
>> We must use time_t types to store time and we cannot use longs to hold
>> them... (thus curl_easy_getinfo's CURLINFO_FILETIME for example is
>> currently broken...)
>>
>> [*] = http://msdn.microsoft.com/en-us/library/3b2e7499%28v=vs.80%29.aspx
> Thanks for the link. As far as I understand, the type cast from 64bit time_t
> to 32bit long should be safe for values below January 19, 2038. So we still
> have some time to improve the API.
Maybe one thing to consider: The cast might not be a logically problem
right now, but it generates a compiler warning. So some people might be
affected in case they need to compile their code without warnings due to
strict quality standards.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-04