diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-08-10 06:41:13 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-08-10 06:41:13 +0000 |
commit | 9dbd6659dc9611110bc48614ee22e40b3935576f (patch) | |
tree | 68a870520026afee8ab153b24e34a00fe1e59d12 /src | |
parent | 5ddad4cdb3f66a12c65845c3b1812406a59dd9ed (diff) |
more typecasts to please picky compilers
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) { /* |