From 24917577d7dada9f652e4a2d5e6f499b25770c55 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 6 Feb 2026 15:14:21 +0300 Subject: [PATCH] Silence unused variable warnings. --- .../conditions/condition_variable/wait_for_pred_pass.cpp | 5 +++-- .../conditions/condition_variable/wait_until_pred_pass.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp b/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp index 8b03f35c..bfc5555f 100644 --- a/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp +++ b/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "../../../timming.hpp" @@ -64,9 +65,9 @@ void f() assert(test2 == 0); test1 = 1; cv.notify_one(); - Clock::time_point t0 = Clock::now(); + BOOST_ATTRIBUTE_UNUSED Clock::time_point t0 = Clock::now(); cv.wait_for(lk, milliseconds(250), Pred(test2)); - Clock::time_point t1 = Clock::now(); + BOOST_ATTRIBUTE_UNUSED Clock::time_point t1 = Clock::now(); if (runs == 0) { assert(t1 - t0 < max_diff); diff --git a/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp b/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp index f4441ea4..a0eee6a6 100644 --- a/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp +++ b/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "../../../timming.hpp" @@ -79,7 +80,7 @@ void f() cv.notify_one(); Clock::time_point t0 = Clock::now(); Clock::time_point t = t0 + Clock::duration(250); - bool r = cv.wait_until(lk, t, Pred(test2)); + BOOST_ATTRIBUTE_UNUSED bool r = cv.wait_until(lk, t, Pred(test2)); Clock::time_point t1 = Clock::now(); if (runs == 0) {