From c3513f7e83804d63f3ba8e65d34ada38974d7851 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 1 May 2017 11:46:44 +0200 Subject: [PATCH] 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. --- src/tool_cb_prg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)