From 316a9f6480014eb7a7ba1dd5423addc96d339859 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 20 Oct 2006 17:54:05 +0000 Subject: Compiler warning fix --- lib/transfer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/transfer.c') 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); -- cgit v1.2.3