]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Fix compiler warnings
authorYang Tse <yangsita@gmail.com>
Mon, 14 Dec 2009 14:02:43 +0000 (14:02 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 14 Dec 2009 14:02:43 +0000 (14:02 +0000)
lib/ftp.c
lib/pingpong.c
lib/pop3.c
lib/smtp.c

index 331d17e9d89f8bd5347a0e9f9c49311d1fe0f786..60abc9cc0a3a6ceb2c679f0684534ff59876c477 100644 (file)
--- 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;
 
index 9de6e6f055ffb59459d5519cbe09aae29a231054..fcc9dd5606a23b4573189b8824182942e7970e60 100644 (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++) {
index cf4fd1c022de8443e5ede3a59481ace6d09541d8..43549f791f95370edfdc63b87e130518b60e7c7b 100644 (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 */
index 7f1b6fc184b9cd93d645c941d93d1599fe7ebcce..0a168b8bd455ad1cfe447e54ada55d65263a9dbd 100644 (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... */