gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 47/254: tool_cb_prg: fix double-promotion warning


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 47/254: tool_cb_prg: fix double-promotion warning
Date: Sat, 17 Jun 2017 16:51:19 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit c3513f7e83804d63f3ba8e65d34ada38974d7851
Author: Marcel Raad <address@hidden>
AuthorDate: Mon May 1 11:46:44 2017 +0200

    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)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]