ERR: Remove warnings

This commit is contained in:
Andy Cedilnik 2003-05-01 11:55:05 -04:00
parent 93f7601d0f
commit 9d6ee55fdf
5 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,4 @@
struct _RPC_ASYNC_STATE;
#include "curl/curl.h"
#include <stdlib.h>

View File

@ -200,7 +200,7 @@ char *getpass_r(const char *prompt, char *buffer, int buflen)
printf("%s", prompt);
for(i=0; i<buflen; i++) {
buffer[i] = getch();
buffer[i] = (char)getch();
if ( buffer[i] == '\r' ) {
buffer[i] = 0;
break;

View File

@ -181,7 +181,7 @@ int Curl_parsenetrc(char *host,
/* we are now parsing sub-keywords concerning "our" host */
if(state_login) {
if (specific_login) {
state_our_login = strequal(login, tok);
state_our_login = (char)strequal(login, tok);
}else{
strncpy(login, tok, LOGINSIZE-1);
#ifdef _NETRC_DEBUG

View File

@ -36,9 +36,15 @@
#include <errno.h>
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#ifdef _MSC_VER
#pragma warning (push,1)
#endif
#include <winsock2.h>
#include <time.h>
#include <io.h>
#ifdef _MSC_VER
#pragma warning (pop)
#endif
#else
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@ -260,10 +266,10 @@ static void send_negotiation(struct connectdata *conn, int cmd, int option)
unsigned char buf[3];
buf[0] = IAC;
buf[1] = cmd;
buf[2] = option;
buf[1] = (unsigned char)cmd;
buf[2] = (unsigned char)option;
swrite(conn->firstsocket, buf, 3);
swrite(conn->firstsocket, (char*)buf, 3);
printoption(conn->data, "SENT", cmd, option);
}
@ -821,13 +827,13 @@ static void suboption(struct connectdata *conn)
struct TELNET *tn = (struct TELNET *)conn->proto.telnet;
printsub(data, '<', (unsigned char *)tn->subbuffer, SB_LEN(tn)+2);
switch (subchar = SB_GET(tn)) {
switch (subchar = (unsigned char)SB_GET(tn)) {
case TELOPT_TTYPE:
len = strlen(tn->subopt_ttype) + 4 + 2;
snprintf((char *)temp, sizeof(temp),
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
TELQUAL_IS, tn->subopt_ttype, IAC, SE);
swrite(conn->firstsocket, temp, len);
swrite(conn->firstsocket, (char*)temp, len);
printsub(data, '>', &temp[2], len-2);
break;
case TELOPT_XDISPLOC:
@ -835,7 +841,7 @@ static void suboption(struct connectdata *conn)
snprintf((char *)temp, sizeof(temp),
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
TELQUAL_IS, tn->subopt_xdisploc, IAC, SE);
swrite(conn->firstsocket, temp, len);
swrite(conn->firstsocket, (char*)temp, len);
printsub(data, '>', &temp[2], len-2);
break;
case TELOPT_NEW_ENVIRON:
@ -857,7 +863,7 @@ static void suboption(struct connectdata *conn)
snprintf((char *)&temp[len], sizeof(temp) - len,
"%c%c", IAC, SE);
len += 2;
swrite(conn->firstsocket, temp, len);
swrite(conn->firstsocket, (char*)temp, len);
printsub(data, '>', &temp[2], len-2);
break;
}
@ -1051,6 +1057,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
ssize_t nread;
struct TELNET *tn;
struct timeval now; /* current time */
(void) now;
code = init_telnet(conn);
if(code)
@ -1095,7 +1102,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
ssize_t bytes_written;
char *buffer = buf;
if(!ReadFile(stdin_handle, buf, 255, &nread, NULL)) {
if(!ReadFile(stdin_handle, buf, 255, &(DWORD)nread, NULL)) {
keepon = FALSE;
break;
}

View File

@ -1095,7 +1095,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
}
/* Now update the "done" boolean we return */
*done = !k->keepon;
*done = (bool)!k->keepon;
return CURLE_OK;
}
@ -1310,6 +1310,7 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
CURLcode Curl_posttransfer(struct SessionHandle *data)
{
(void)data;
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
/* restore the signal handler for SIGPIPE before we get back */
if(!data->set.no_signal)