ERR: Remove warnings
This commit is contained in:
parent
93f7601d0f
commit
9d6ee55fdf
|
@ -1,3 +1,4 @@
|
||||||
|
struct _RPC_ASYNC_STATE;
|
||||||
#include "curl/curl.h"
|
#include "curl/curl.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ char *getpass_r(const char *prompt, char *buffer, int buflen)
|
||||||
printf("%s", prompt);
|
printf("%s", prompt);
|
||||||
|
|
||||||
for(i=0; i<buflen; i++) {
|
for(i=0; i<buflen; i++) {
|
||||||
buffer[i] = getch();
|
buffer[i] = (char)getch();
|
||||||
if ( buffer[i] == '\r' ) {
|
if ( buffer[i] == '\r' ) {
|
||||||
buffer[i] = 0;
|
buffer[i] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -181,7 +181,7 @@ int Curl_parsenetrc(char *host,
|
||||||
/* we are now parsing sub-keywords concerning "our" host */
|
/* we are now parsing sub-keywords concerning "our" host */
|
||||||
if(state_login) {
|
if(state_login) {
|
||||||
if (specific_login) {
|
if (specific_login) {
|
||||||
state_our_login = strequal(login, tok);
|
state_our_login = (char)strequal(login, tok);
|
||||||
}else{
|
}else{
|
||||||
strncpy(login, tok, LOGINSIZE-1);
|
strncpy(login, tok, LOGINSIZE-1);
|
||||||
#ifdef _NETRC_DEBUG
|
#ifdef _NETRC_DEBUG
|
||||||
|
|
|
@ -36,9 +36,15 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning (push,1)
|
||||||
|
#endif
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning (pop)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <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];
|
unsigned char buf[3];
|
||||||
|
|
||||||
buf[0] = IAC;
|
buf[0] = IAC;
|
||||||
buf[1] = cmd;
|
buf[1] = (unsigned char)cmd;
|
||||||
buf[2] = option;
|
buf[2] = (unsigned char)option;
|
||||||
|
|
||||||
swrite(conn->firstsocket, buf, 3);
|
swrite(conn->firstsocket, (char*)buf, 3);
|
||||||
|
|
||||||
printoption(conn->data, "SENT", cmd, option);
|
printoption(conn->data, "SENT", cmd, option);
|
||||||
}
|
}
|
||||||
|
@ -821,13 +827,13 @@ static void suboption(struct connectdata *conn)
|
||||||
struct TELNET *tn = (struct TELNET *)conn->proto.telnet;
|
struct TELNET *tn = (struct TELNET *)conn->proto.telnet;
|
||||||
|
|
||||||
printsub(data, '<', (unsigned char *)tn->subbuffer, SB_LEN(tn)+2);
|
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:
|
case TELOPT_TTYPE:
|
||||||
len = strlen(tn->subopt_ttype) + 4 + 2;
|
len = strlen(tn->subopt_ttype) + 4 + 2;
|
||||||
snprintf((char *)temp, sizeof(temp),
|
snprintf((char *)temp, sizeof(temp),
|
||||||
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
|
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE,
|
||||||
TELQUAL_IS, tn->subopt_ttype, IAC, SE);
|
TELQUAL_IS, tn->subopt_ttype, IAC, SE);
|
||||||
swrite(conn->firstsocket, temp, len);
|
swrite(conn->firstsocket, (char*)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
case TELOPT_XDISPLOC:
|
case TELOPT_XDISPLOC:
|
||||||
|
@ -835,7 +841,7 @@ static void suboption(struct connectdata *conn)
|
||||||
snprintf((char *)temp, sizeof(temp),
|
snprintf((char *)temp, sizeof(temp),
|
||||||
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
|
"%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC,
|
||||||
TELQUAL_IS, tn->subopt_xdisploc, IAC, SE);
|
TELQUAL_IS, tn->subopt_xdisploc, IAC, SE);
|
||||||
swrite(conn->firstsocket, temp, len);
|
swrite(conn->firstsocket, (char*)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
case TELOPT_NEW_ENVIRON:
|
case TELOPT_NEW_ENVIRON:
|
||||||
|
@ -857,7 +863,7 @@ static void suboption(struct connectdata *conn)
|
||||||
snprintf((char *)&temp[len], sizeof(temp) - len,
|
snprintf((char *)&temp[len], sizeof(temp) - len,
|
||||||
"%c%c", IAC, SE);
|
"%c%c", IAC, SE);
|
||||||
len += 2;
|
len += 2;
|
||||||
swrite(conn->firstsocket, temp, len);
|
swrite(conn->firstsocket, (char*)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1051,6 +1057,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
struct TELNET *tn;
|
struct TELNET *tn;
|
||||||
struct timeval now; /* current time */
|
struct timeval now; /* current time */
|
||||||
|
(void) now;
|
||||||
|
|
||||||
code = init_telnet(conn);
|
code = init_telnet(conn);
|
||||||
if(code)
|
if(code)
|
||||||
|
@ -1095,7 +1102,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
||||||
ssize_t bytes_written;
|
ssize_t bytes_written;
|
||||||
char *buffer = buf;
|
char *buffer = buf;
|
||||||
|
|
||||||
if(!ReadFile(stdin_handle, buf, 255, &nread, NULL)) {
|
if(!ReadFile(stdin_handle, buf, 255, &(DWORD)nread, NULL)) {
|
||||||
keepon = FALSE;
|
keepon = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now update the "done" boolean we return */
|
/* Now update the "done" boolean we return */
|
||||||
*done = !k->keepon;
|
*done = (bool)!k->keepon;
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
@ -1310,6 +1310,7 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
|
||||||
|
|
||||||
CURLcode Curl_posttransfer(struct SessionHandle *data)
|
CURLcode Curl_posttransfer(struct SessionHandle *data)
|
||||||
{
|
{
|
||||||
|
(void)data;
|
||||||
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
|
#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
|
||||||
/* restore the signal handler for SIGPIPE before we get back */
|
/* restore the signal handler for SIGPIPE before we get back */
|
||||||
if(!data->set.no_signal)
|
if(!data->set.no_signal)
|
||||||
|
|
Loading…
Reference in New Issue