]> sigrok.org Git - pulseview.git/commit
Fix two errors with clang 3.6.
authorUwe Hermann <redacted>
Wed, 27 Aug 2014 13:29:48 +0000 (15:29 +0200)
committerUwe Hermann <redacted>
Wed, 27 Aug 2014 13:32:27 +0000 (15:32 +0200)
commitc8870d9e7af0af746776680a266d0da3ec3280ec
treeed1563306bc041a0183c9a04bac46760a9960748
parentad629dd65d1cf2ebf5cd359e9296b72f9ce2cbab
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
pv/widgets/sweeptimingwidget.cpp