cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libCurl 7.16.0, MSVC 6.0: datatype of curl_off_t raises warning C4244 in transfer.c(1147)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Dec 2006 15:50:25 +0100 (CET)

On Wed, 6 Dec 2006, Stefan Krause wrote:

> I changed line transfer.c(1147) from 'Curl_read_rewind(conn, excess);' to
> 'Curl_read_rewind(conn, (size_t)excess);'.

> With the cast the warning is gone and it compiles well for MSVC 6. How can I
> follow up your change?

My change was somewhat larger but the effect would be the same - I changed the
variable type of 'excess' to be size_t. The size of mine grew bigger since I
moved the entire Curl_read_rewind() function between the two files to make it
file local. See:

http://cool.haxx.se/cvs.cgi/curl/lib/transfer.c.diff?r1=1.322&r2=1.323

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-12-07