]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
progress: fix a compile warning on some systems
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Tue, 10 Aug 2021 08:00:51 +0000 (10:00 +0200)
committerMichael Kaufmann <mail@michael-kaufmann.ch>
Tue, 10 Aug 2021 20:39:16 +0000 (22:39 +0200)
lib/progress.c:380:40: warning: conversion to 'long double' from
'curl_off_t {aka long long int}' may alter its value [-Wconversion]

Closes #7549

lib/progress.c

index 4bcd615ebaf2382967f6df76dae6dea6b7cfa289..62e61d45b4557dbd0276b6b91542cc062085cfa2 100644 (file)
@@ -377,7 +377,7 @@ static curl_off_t trspeed(curl_off_t size, /* number of bytes */
 {
   if(us < 1)
     return size * 1000000;
-  return (curl_off_t)((long double)size/us * 1000000);
+  return (curl_off_t)((long double)size/(long double)us * 1000000);
 }
 
 /* returns TRUE if it's time to show the progress meter */