Fix compiler warnings

This commit is contained in:
Yang Tse 2009-12-14 14:02:43 +00:00
parent 364d76aca7
commit b0f548fb56
4 changed files with 13 additions and 8 deletions

View File

@ -381,8 +381,10 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
size_t *size) /* size of the response */
{
struct connectdata *conn = pp->conn;
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
struct SessionHandle *data = conn->data;
char * const buf = data->state.buffer;
#endif
CURLcode result = CURLE_OK;
int code;

View File

@ -369,7 +369,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
ssize_t clipamount = 0;
bool restart = FALSE;
data->req.headerbytecount += gotbytes;
data->req.headerbytecount += (long)gotbytes;
pp->nread_resp += gotbytes;
for(i = 0; i < gotbytes; ptr++, i++) {

View File

@ -427,9 +427,7 @@ static CURLcode pop3_statemach_act(struct connectdata *conn)
if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
/* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
to TLS connection now */
const char *str;
result = Curl_pp_sendf(&pop3c->pp, "STARTTLS", str);
result = Curl_pp_sendf(&pop3c->pp, "STARTTLS", NULL);
state(conn, POP3_STARTTLS);
}
else
@ -930,7 +928,7 @@ CURLcode Curl_pop3_write(struct connectdata *conn,
struct pop3_conn *pop3c = &conn->proto.pop3c;
int checkmax = (nread >= POP3_EOB_LEN?POP3_EOB_LEN:nread);
int checkleft = POP3_EOB_LEN-pop3c->eob;
int check = checkmax>= checkleft?checkleft:checkmax;
int check = (checkmax >= checkleft?checkleft:checkmax);
if(!memcmp(POP3_EOB, &str[nread - check], check)) {
/* substring match */

View File

@ -108,7 +108,9 @@ static int smtp_getsock(struct connectdata *conn,
static CURLcode smtp_doing(struct connectdata *conn,
bool *dophase_done);
static CURLcode smtp_setup_connection(struct connectdata * conn);
#if 0
static void smtp_respinit(struct connectdata *conn);
#endif
/*
* SMTP protocol handler.
@ -320,7 +322,9 @@ static CURLcode smtp_mail(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
#if 0
struct FTP *smtp = data->state.proto.smtp;
#endif
/* send MAIL */
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:<%s>",
@ -439,9 +443,7 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
/* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
to TLS connection now */
const char *str;
result = Curl_pp_sendf(&smtpc->pp, "STARTTLS", str);
result = Curl_pp_sendf(&smtpc->pp, "STARTTLS", NULL);
state(conn, SMTP_STARTTLS);
}
else
@ -804,8 +806,11 @@ static CURLcode smtp_disconnect(struct connectdata *conn)
static CURLcode smtp_parse_url_path(struct connectdata *conn)
{
/* the smtp struct is already inited in smtp_connect() */
#if 0
struct smtp_conn *smtpc = &conn->proto.smtpc;
struct SessionHandle *data = conn->data;
#endif
(void)conn;
/* url decode... */