From 9dbd6659dc9611110bc48614ee22e40b3935576f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Aug 2004 06:41:13 +0000 Subject: more typecasts to please picky compilers --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index a0c04dc68..03c854d1a 100644 --- a/src/main.c +++ b/src/main.c @@ -2279,7 +2279,9 @@ static int my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream) int rc; struct OutStruct *out=(struct OutStruct *)stream; struct Configurable *config = out->config; - curl_off_t size = sz * nmemb; + curl_off_t size = (curl_off_t)(sz * nmemb); /* typecast to prevent + warnings when converting from + unsigned to signed */ if(out && !out->stream) { /* open file for writing */ out->stream=fopen(out->filename, "wb"); @@ -2354,7 +2356,9 @@ static int my_fread(void *buffer, size_t sz, size_t nmemb, void *userp) { struct InStruct *in=(struct InStruct *)userp; struct Configurable *config = in->config; - curl_off_t size = sz * nmemb; + curl_off_t size = (curl_off_t)(sz * nmemb); /* typecast to prevent warnings + when converting from + unsigned to signed */ if(config->sendpersecond) { /* -- cgit v1.2.3