curl-library
Re: those pragmas are bad
Date: Mon, 26 Aug 2002 03:57:18 +0800 (WST)
On Thu, 22 Aug 2002, Daniel Stenberg wrote:
> I would really like them all to be removed, and to have the actual causes for
> all those corrected instead of just hidden.
This diff is against the current stuff in cvs and fixes all the
warnings when compiling with MSVC 6. Seems that MSVC really doesn't
like implicit casts in function calls, making the casts explicit
fixed it. All of the casts seemed legitimate (ie the implicit
casting itself wasn't a bug).
There were some needless type conversions in src/main.c:myprogress
that I removed.
There's one warning left, in http.c the following code:
co = Curl_cookie_getlist(data->cookies,
host, ppath,
conn->protocol&PROT_HTTPS?TRUE:FALSE);
Produces this:
.\http.c(555) : warning C4761: integral size mismatch in argument;
conversion supplied.
Casting the last argument to bool fixes it, but
#undef TRUE
#define TRUE ((bool)1)
and likewise for FALSE doesn't. Seems that regardless of both
possibilities being bool (ie unsigned char), MSVC is still considering
the result of the ?: to be a int. My feeling is that this is a
compiler bug.
Cheers
-- Andrew Francis Software Developer Family Health Network
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
- TEXT/PLAIN attachment: curl-vcwarn.diff