cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Minor patch to remove a couple of msvc compiler warnings

From: Jamie Lokier <jamie_at_shareable.org>
Date: Tue, 15 Nov 2005 17:37:19 +0000

Yang Tse wrote:
> > Ick. On UNIX, this is 'const void *'. What is it on your system?
>
> On Windows it is 'const char *'. In this case, I think, there is no
> problem typecasting this argument as (void *), it equally shuts up the
> compiler warning and should be compatible with all platforms.

"char *" is the most compatible you can cast to, because it'll work
without warnings with all the system header variations ("const char
*", "char *", "const void *" and "void *"), and because some old
compilers don't understand "void *". However, I think Curl probably
doesn't compile on those old compilers anyway.

-- Jamie
Received on 2005-11-15