From 6ee65bc98a5b58822ec28317a3dff64797ccd1bc Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 15 Jul 2017 18:42:19 +0200 Subject: [PATCH] Fix clang warning: using floating point absolute value function 'fabsf' when argument is of integer type /retroshare-gui/src/gui/statistics/BWGraph.cpp:83: warning: using floating point absolute value function 'fabsf' when argument is of integer type [-Wabsolute-value] if(!lst.empty() && fabsf(lst.back().first - ms) > _update_period_msecs*1.2 ) --- retroshare-gui/src/gui/statistics/BWGraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/statistics/BWGraph.cpp b/retroshare-gui/src/gui/statistics/BWGraph.cpp index 185782015..15405f608 100644 --- a/retroshare-gui/src/gui/statistics/BWGraph.cpp +++ b/retroshare-gui/src/gui/statistics/BWGraph.cpp @@ -80,7 +80,7 @@ void BWGraphSource::update() { std::list >& lst(_points[it->first]) ; - if(!lst.empty() && fabsf(lst.back().first - ms) > _update_period_msecs*1.2 ) + if(!lst.empty() && fabsf((float)(lst.back().first - ms)) > _update_period_msecs*1.2 ) { lst.push_back(std::make_pair(lst.back().first,0)) ; lst.push_back(std::make_pair( ms,0)) ;