summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-12-14 14:02:43 +0000
committerYang Tse <yangsita@gmail.com>2009-12-14 14:02:43 +0000
commitb0f548fb56d61a44a1f689b25955140c01e1821b (patch)
tree67cc5bcfddbf5318f8efac0d382b6ac89205e06f /lib
parent364d76aca717432ce40b69fd951de71efdc18d9b (diff)
downloadcurl-b0f548fb56d61a44a1f689b25955140c01e1821b.tar.gz
Fix compiler warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c2
-rw-r--r--lib/pingpong.c2
-rw-r--r--lib/pop3.c6
-rw-r--r--lib/smtp.c11
4 files changed, 13 insertions, 8 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 331d17e9d..60abc9cc0 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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;
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 9de6e6f05..fcc9dd560 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -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++) {
diff --git a/lib/pop3.c b/lib/pop3.c
index cf4fd1c02..43549f791 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -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 */
diff --git a/lib/smtp.c b/lib/smtp.c
index 7f1b6fc18..0a168b8bd 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -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... */