progress: fix a compile warning on some systems

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
This commit is contained in:
Michael Kaufmann 2021-08-10 10:00:51 +02:00
parent 7dbda156e6
commit dd37639df7

View 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 */