|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81645 - in trunk/libs/thread: example test/sync/mutual_exclusion/locks/lock_guard test/sync/mutual_exclusion/locks/unique_lock/cons
From: vicente.botet_at_[hidden]
Date: 2012-12-01 06:04:26
Author: viboes
Date: 2012-12-01 06:04:25 EST (Sat, 01 Dec 2012)
New Revision: 81645
URL: http://svn.boost.org/trac/boost/changeset/81645
Log:
Thread: remove warnings
Text files modified:
trunk/libs/thread/example/condition.cpp | 4 +++-
trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp | 6 ++++--
trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp | 2 +-
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp | 4 ++--
4 files changed, 10 insertions(+), 6 deletions(-)
Modified: trunk/libs/thread/example/condition.cpp
==============================================================================
--- trunk/libs/thread/example/condition.cpp (original)
+++ trunk/libs/thread/example/condition.cpp 2012-12-01 06:04:25 EST (Sat, 01 Dec 2012)
@@ -9,6 +9,7 @@
#include <boost/utility.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/thread.hpp>
+#include "../test/remove_error_code_unused_warning.hpp"
class bounded_buffer : private boost::noncopyable
{
@@ -38,7 +39,8 @@
}
private:
- int begin, end, buffered;
+ int begin, end;
+ std::vector<int>::size_type buffered;
std::vector<int> circular_buf;
boost::condition_variable_any buffer_not_full, buffer_not_empty;
boost::mutex monitor;
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp 2012-12-01 06:04:25 EST (Sat, 01 Dec 2012)
@@ -22,6 +22,7 @@
#include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp>
+
#ifdef BOOST_THREAD_USES_CHRONO
typedef boost::chrono::high_resolution_clock Clock;
typedef Clock::time_point time_point;
@@ -40,7 +41,8 @@
time_point t1;
{
m.lock();
- auto&& lg = boost::make_lock_guard(m, boost::adopt_lock);
+ auto&& lg = boost::make_lock_guard(m, boost::adopt_lock); (void)lg;
+
t1 = Clock::now();
}
ns d = t1 - t0 - ms(250);
@@ -50,7 +52,7 @@
//time_point t1;
{
m.lock();
- auto&& lg = boost::make_lock_guard(m, boost::adopt_lock);
+ auto&& lg = boost::make_lock_guard(m, boost::adopt_lock); (void)lg;
//t1 = Clock::now();
}
//ns d = t1 - t0 - ms(250);
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_pass.cpp 2012-12-01 06:04:25 EST (Sat, 01 Dec 2012)
@@ -45,7 +45,7 @@
time_point t0 = Clock::now();
time_point t1;
{
- const auto&& lg = boost::make_lock_guard(m);
+ const auto&& lg = boost::make_lock_guard(m); (void)lg;
t1 = Clock::now();
BOOST_THREAD_TRACE;
}
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/make_unique_lock_mutex_pass.cpp 2012-12-01 06:04:25 EST (Sat, 01 Dec 2012)
@@ -33,7 +33,7 @@
time_point t0 = Clock::now();
time_point t1;
{
- auto&& _ = boost::make_unique_lock(m);
+ auto&& _ = boost::make_unique_lock(m); (void)_;
t1 = Clock::now();
}
ns d = t1 - t0 - ms(250);
@@ -43,7 +43,7 @@
//time_point t0 = Clock::now();
//time_point t1;
{
- auto _ = boost::make_unique_lock(m);
+ auto _ = boost::make_unique_lock(m); (void)_;
//t1 = Clock::now();
}
//ns d = t1 - t0 - ms(250);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk