THRIFT-1999: warning on gcc 4.7 while compiling BoostMutex.cpp
authorBen Craig <bencraig@apache.org>
Thu, 29 Aug 2013 15:45:21 +0000 (10:45 -0500)
committerBen Craig <bencraig@apache.org>
Thu, 29 Aug 2013 15:45:21 +0000 (10:45 -0500)
Client: cpp
Patch: Konrad Grochowski

lib/cpp/src/thrift/concurrency/BoostMutex.cpp

index eb0c3c1..59c3618 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <thrift/concurrency/Mutex.h>
 #include <thrift/concurrency/Util.h>
+#include <thrift/Thrift.h>
 
 #include <cassert>
 #include <boost/thread.hpp>
@@ -37,7 +38,8 @@ namespace apache { namespace thrift { namespace concurrency {
 class Mutex::impl : public boost::timed_mutex {
 };
 
-Mutex::Mutex(Initializer init) : impl_(new Mutex::impl()) {}
+Mutex::Mutex(Initializer init) : impl_(new Mutex::impl())
+{ THRIFT_UNUSED_VARIABLE(init); }
 
 void* Mutex::getUnderlyingImpl() const { return impl_.get(); }
 
@@ -50,7 +52,7 @@ bool Mutex::timedlock(int64_t ms) const { return impl_->timed_lock(boost::get_sy
 void Mutex::unlock() const { impl_->unlock(); }
 
 void Mutex::DEFAULT_INITIALIZER(void* arg) {
+  THRIFT_UNUSED_VARIABLE(arg);
 }
 
 }}} // apache::thrift::concurrency
-