summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-04-23 16:31:08 +0000
committerTor Egge <Tor.Egge@online.no>2022-04-23 16:31:08 +0000
commit0883fa86f1b7af5b2c108974b4113e8d4a5f3ed6 (patch)
treebddf76b6ede473ff663575374ed4cfdcabd1c9b5 /vespalib
parent42dfc8a672fa4e088246fd8d7430a61b724bcbdf (diff)
Pretend to not ignore result from nice().
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/nice/nice_test.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/nice.cpp2
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
}
}