]> granicus.if.org Git - curl/commitdiff
fixed compiler warnings
authorBen Greear <greearb@candelatech.com>
Fri, 2 Apr 2010 19:02:35 +0000 (21:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 2 Apr 2010 19:02:35 +0000 (21:02 +0200)
lib/pop3.h
lib/smtp.c
lib/smtp.h

index 20a2269856eff13831c4d078347c0cb135452157..337421cac695a70af4f32fb613d631cd71e85149 100644 (file)
@@ -43,8 +43,8 @@ typedef enum {
 struct pop3_conn {
   struct pingpong pp;
   char *mailbox;     /* what to RETR */
-  int eob;        /* number of bytes of the EOB (End Of Body) that has been
-                     received thus far */
+  size_t eob;        /* number of bytes of the EOB (End Of Body) that has been
+                        received thus far */
   pop3state state; /* always use pop3.c:state() to change state! */
 };
 
index 2f7350b977634ca772f22e762249ed938ae956d3..654f4350591a94ffecd27bae74dfb397d215273b 100644 (file)
@@ -1045,8 +1045,8 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
    * the data and make sure it is sent as CRLF..CRLF instead, as
    * otherwise it will wrongly be detected as end of data by the server.
    */
-  int i;
-  int si;
+  ssize_t i;
+  ssize_t si;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   struct SessionHandle *data = conn->data;
 
@@ -1061,7 +1061,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
   for(i = 0, si = 0; i < nread; i++, si++) {
     ssize_t left = nread - i;
 
-    if(left>= (SMTP_EOB_LEN-smtpc->eob)) {
+    if(left>= (ssize_t)(SMTP_EOB_LEN-smtpc->eob)) {
       if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
                  SMTP_EOB_LEN-smtpc->eob)) {
         /* It matched, copy the replacement data to the target buffer
index fac43041abb336110c66b623de31388d140a1bc1..4716338b5355517abe1d0de1b4cf9c04804b4afb 100644 (file)
@@ -47,8 +47,8 @@ typedef enum {
 struct smtp_conn {
   struct pingpong pp;
   char *domain;    /* what to send in the EHLO */
-  int eob;         /* number of bytes of the EOB (End Of Body) that has been
-                      received thus far */
+  size_t eob;         /* number of bytes of the EOB (End Of Body) that has been
+                         received thus far */
   smtpstate state; /* always use smtp.c:state() to change state! */
   struct curl_slist *rcpt;
 };