diff --git a/src/Magnum/Math/Test/FunctionsBenchmark.cpp b/src/Magnum/Math/Test/FunctionsBenchmark.cpp index 24eb38aad..cd59e4908 100644 --- a/src/Magnum/Math/Test/FunctionsBenchmark.cpp +++ b/src/Magnum/Math/Test/FunctionsBenchmark.cpp @@ -201,6 +201,10 @@ void FunctionsBenchmark::sinCosSeparate() { } CORRADE_COMPARE_AS(a, 10.0f, Corrade::TestSuite::Compare::Greater); + + /* To avoid the whole loop being optimized away */ + CORRADE_VERIFY(sin == sin); + CORRADE_VERIFY(cos == cos); } void FunctionsBenchmark::sinCosCombined() { @@ -213,6 +217,10 @@ void FunctionsBenchmark::sinCosCombined() { } CORRADE_COMPARE_AS(a, 10.0f, Corrade::TestSuite::Compare::Greater); + + /* To avoid the whole loop being optimized away */ + CORRADE_VERIFY(sin == sin); + CORRADE_VERIFY(cos == cos); } diff --git a/src/Magnum/Math/Test/InterpolationBenchmark.cpp b/src/Magnum/Math/Test/InterpolationBenchmark.cpp index 024404837..442bc9826 100644 --- a/src/Magnum/Math/Test/InterpolationBenchmark.cpp +++ b/src/Magnum/Math/Test/InterpolationBenchmark.cpp @@ -70,6 +70,9 @@ void InterpolationBenchmark::baseline() { } CORRADE_VERIFY(!c.isNormalized()); + + /* To avoid "unused but set" warnings */ + CORRADE_VERIFY(t == t); } void InterpolationBenchmark::quaternionLerp() {