mirror of
https://github.com/boostorg/thread.git
synced 2026-02-08 23:22:13 +00:00
Silence unused variable warnings.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#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);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user