]> granicus.if.org Git - curl/commitdiff
Compiler warning fix
authorYang Tse <yangsita@gmail.com>
Fri, 20 Oct 2006 17:54:05 +0000 (17:54 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 20 Oct 2006 17:54:05 +0000 (17:54 +0000)
lib/transfer.c

index 25645c97d60b106f3d7a97d13c5dd87cc8a1e99e..e136020b0114ca8ebd66e3c94141301d3113ab7e 100644 (file)
@@ -319,7 +319,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
         int readrc;
 
         if (k->size != -1 && !k->header)
-          bytestoread = k->size - k->bytecount;
+          bytestoread = (size_t)(k->size - k->bytecount);
 
         /* receive data from the network! */
         readrc = Curl_read(conn, conn->sockfd, k->buf, bytestoread, &nread);
@@ -1133,7 +1133,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
 
           if((-1 != k->maxdownload) &&
              (k->bytecount + nread >= k->maxdownload)) {
-            size_t excess = k->bytecount + nread - k->maxdownload;
+            size_t excess = (size_t)(k->bytecount + 
+                             (curl_off_t)nread - k->maxdownload);
 
             if (excess > 0) {
                 infof(data, "Rewinding stream by : %d bytes\n", excess);