From c8870d9e7af0af746776680a266d0da3ec3280ec Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 27 Aug 2014 15:29:48 +0200 Subject: [PATCH 1/1] Fix two errors with clang 3.6. [...]/pv/view/viewport.cpp:202:6: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value] if (abs(w) >= 1.0) { ^ [...]/pv/view/viewport.cpp:202:6: note: use function 'std::abs' instead if (abs(w) >= 1.0) { ^~~ std::abs [...]/pv/widgets/sweeptimingwidget.cpp:172:33: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] const int64_t this_variance = abs( ^ [...]/pv/widgets/sweeptimingwidget.cpp:172:33: note: use function 'std::abs' instead const int64_t this_variance = abs( ^~~ std::abs --- pv/view/viewport.cpp | 1 + pv/widgets/sweeptimingwidget.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index f0c78e67..b141c38a 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -28,6 +28,7 @@ #include +using std::abs; using std::max; using std::min; using std::shared_ptr; diff --git a/pv/widgets/sweeptimingwidget.cpp b/pv/widgets/sweeptimingwidget.cpp index 00ebb769..7a734a13 100644 --- a/pv/widgets/sweeptimingwidget.cpp +++ b/pv/widgets/sweeptimingwidget.cpp @@ -26,6 +26,7 @@ #include +using std::abs; using std::vector; namespace pv { -- 2.30.2