1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

tool_cb_prg: fix double-promotion warning

clang complains:
tool_cb_prg.c:86:22: error: implicit conversion increases
floating-point precision: 'float' to 'double'
[-Werror,-Wdouble-promotion]

Fix this by using a double instead of a float constant.
This commit is contained in:
Marcel Raad 2017-05-01 11:46:44 +02:00
parent 6cba8dacea
commit c3513f7e83
No known key found for this signature in database
GPG Key ID: B4668817AE6D6CD4

View File

@ -83,7 +83,7 @@ int tool_progress_cb(void *clientp,
}
else if(point != bar->prev) {
frac = (double)point / (double)total;
percent = frac * 100.0f;
percent = frac * 100.0;
barwidth = bar->width - 7;
num = (int) (((double)barwidth) * frac);
if(num > MAX_BARLENGTH)