summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-20 17:54:05 +0000
committerYang Tse <yangsita@gmail.com>2006-10-20 17:54:05 +0000
commit316a9f6480014eb7a7ba1dd5423addc96d339859 (patch)
tree75a588cc45d5ff54641122b2aae8449bab1f49bb
parentc6de584cade67d1779c29f0b5706ceaddfd42d11 (diff)
downloadgnurl-316a9f6480014eb7a7ba1dd5423addc96d339859.tar.gz
gnurl-316a9f6480014eb7a7ba1dd5423addc96d339859.tar.bz2
gnurl-316a9f6480014eb7a7ba1dd5423addc96d339859.zip
Compiler warning fix
-rw-r--r--lib/transfer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 25645c97d..e136020b0 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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);