Re: Minor patch to remove a couple of msvc compiler warnings
Date: Mon, 14 Nov 2005 08:49:10 +0100 (CET)
On Mon, 14 Nov 2005, Yang Tse wrote:
> The first patch adds an explicit cast when calling function 'sendto' in
> + sbytes = sendto(state->sockfd, (char *)&state->spacket,
> + sbytes, 0,
Sorry, but as Albert Chin pointed out, all these socket functions are not that
easily typecasted and that's actually the reason for quite a few remaining
compiler warnings on several platforms.
Old unixes and Microsoft often agree on the types for arguments to functions
such as sendto() and others, while modern unixes and the Single Unix
Specification have a different set. See the sendto() definition for example:
If we are to fix this warning, we must introduce a define or macro for the
arguments' types and typecast to them and thus have them set differently
depending on what platform we build on/for.
> +; DESCRIPTION 'curl libcurl - http://curl.haxx.se'
I applied and committed this patch!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-11-14