diff options
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/nice/nice_test.cpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/nice.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vespalib/src/tests/nice/nice_test.cpp b/vespalib/src/tests/nice/nice_test.cpp index ec1d25be3bd..86fb3be0667 100644 --- a/vespalib/src/tests/nice/nice_test.cpp +++ b/vespalib/src/tests/nice/nice_test.cpp @@ -50,7 +50,7 @@ TEST("require that nice value is tracked per thread") { for (int i = 0; i < 5; ++i) { threads.push_back(run_with_init([my_barrier = &barrier, i] { - nice(i); + [[maybe_unused]] auto nice_result = nice(i); (*my_barrier)(); EXPECT_EQUAL(nice(0), i); })); diff --git a/vespalib/src/vespa/vespalib/util/nice.cpp b/vespalib/src/vespa/vespalib/util/nice.cpp index cefaaa0347b..4b3b6a266e6 100644 --- a/vespalib/src/vespa/vespalib/util/nice.cpp +++ b/vespalib/src/vespa/vespalib/util/nice.cpp @@ -15,7 +15,7 @@ void set_nice_value(double how_nice) { int now = nice(0); int max = 19; int max_inc = (max - now); - nice(std::min(max_inc, int(how_nice * (max_inc + 1)))); + [[maybe_unused]] auto nice_result = nice(std::min(max_inc, int(how_nice * (max_inc + 1)))); #endif } } |