curl-library
Re: Minor patch to remove a couple of msvc compiler warnings
Date: Sun, 13 Nov 2005 22:54:24 -0600
On Mon, Nov 14, 2005 at 04:47:07AM +0100, Yang Tse wrote:
> The first patch adds an explicit cast when calling function 'sendto' in tftp.c
>
> diff -urp c:\f\curl-old/curl/lib/tftp.c c:\f\curl-new/curl/lib/tftp.c
> --- c:\f\curl-old/curl/lib/tftp.c 2005-11-13 14:20:37.000000000 +0100
> +++ c:\f\curl-new/curl/lib/tftp.c 2005-11-14 03:43:28.819140800 +0100
> @@ -278,7 +278,8 @@ static void tftp_send_first(tftp_state_d
> sprintf((char *)state->spacket.u.request.data, "%s%c%s%c",
> filename, '\0', mode, '\0');
> sbytes = 4 + strlen(filename) + strlen(mode);
> - sbytes = sendto(state->sockfd, &state->spacket, sbytes, 0,
> + sbytes = sendto(state->sockfd, (char *)&state->spacket,
> + sbytes, 0,
> state->conn->ip_addr->ai_addr,
> state->conn->ip_addr->ai_addrlen);
> if(sbytes < 0) {
Ick. On UNIX, this is 'const void *'. What is it on your system?
-- albert chin (china_at_thewrittenword.com)Received on 2005-11-14