From: Marcel Raad Date: Mon, 1 May 2017 09:46:44 +0000 (+0200) Subject: tool_cb_prg: fix double-promotion warning X-Git-Tag: curl-7_54_1~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3513f7e83804d63f3ba8e65d34ada38974d7851;p=curl 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. --- diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c index eae80fe12..d4ecb3cef 100644 --- a/src/tool_cb_prg.c +++ b/src/tool_cb_prg.c @@ -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)