From: Ondrej Lehecka Date: Wed, 22 Jul 2015 18:57:18 +0000 (-0700) Subject: making thrift and folly header files compile clean with -Wunused-parameter X-Git-Tag: v0.52.0~13 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=89282758b5c8c2c12f8786f070876a3af6547bdd;p=folly.git making thrift and folly header files compile clean with -Wunused-parameter Summary: fixing compiler errors when compiling with Wunused-parameter Reviewed By: @yfeldblum Differential Revision: D2267014 --- diff --git a/folly/AtomicHashArray.h b/folly/AtomicHashArray.h index bbb3cdd4..7f12f862 100644 --- a/folly/AtomicHashArray.h +++ b/folly/AtomicHashArray.h @@ -295,7 +295,7 @@ class AtomicHashArray : boost::noncopyable { return LIKELY(probe < capacity_) ? probe : hashVal % capacity_; } - inline size_t probeNext(size_t idx, size_t numProbes) { + inline size_t probeNext(size_t idx, size_t /*numProbes*/) { //idx += numProbes; // quadratic probing idx += 1; // linear probing // Avoid modulus because it's slow diff --git a/folly/Conv.h b/folly/Conv.h index ccb394b9..2991f02e 100644 --- a/folly/Conv.h +++ b/folly/Conv.h @@ -153,7 +153,7 @@ template typename std::tuple_element< sizeof...(Ts), std::tuple >::type const& - getLastElement(const T& v, const Ts&... vs) { + getLastElement(const T&, const Ts&... vs) { return getLastElement(vs...); } diff --git a/folly/FBString.h b/folly/FBString.h index 23bfeb47..c43460a2 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -1035,7 +1035,7 @@ public: : store_(s, n) { } - basic_fbstring(size_type n, value_type c, const A& a = A()) { + basic_fbstring(size_type n, value_type c, const A& /*a*/ = A()) { auto const data = store_.expand_noinit(n); fbstring_detail::pod_fill(data, data + n, c); store_.writeTerminator(); @@ -1045,7 +1045,7 @@ public: basic_fbstring(InIt begin, InIt end, typename std::enable_if< !std::is_same::type, - value_type*>::value, const A>::type & a = A()) { + value_type*>::value, const A>::type & /*a*/ = A()) { assign(begin, end); } diff --git a/folly/Traits.h b/folly/Traits.h index fd2be06b..0a291024 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -309,7 +309,7 @@ struct is_negative_impl { template struct is_negative_impl { - constexpr static bool check(T x) { return false; } + constexpr static bool check(T) { return false; } }; // folly::to integral specializations can end up generating code diff --git a/folly/detail/ThreadLocalDetail.h b/folly/detail/ThreadLocalDetail.h index 6769410b..42c0a2d0 100644 --- a/folly/detail/ThreadLocalDetail.h +++ b/folly/detail/ThreadLocalDetail.h @@ -60,7 +60,7 @@ class DeleterBase { template class SimpleDeleter : public DeleterBase { public: - virtual void dispose(void* ptr, TLPDestructionMode mode) const { + virtual void dispose(void* ptr, TLPDestructionMode /*mode*/) const { delete static_cast(ptr); } }; diff --git a/folly/dynamic-inl.h b/folly/dynamic-inl.h index 324e7118..6db141be 100644 --- a/folly/dynamic-inl.h +++ b/folly/dynamic-inl.h @@ -404,7 +404,7 @@ struct dynamic::CompareOp { }; template<> struct dynamic::CompareOp { - static bool comp(ObjectImpl const& a, ObjectImpl const& b) { + static bool comp(ObjectImpl const&, ObjectImpl const&) { // This code never executes; it is just here for the compiler. return false; } diff --git a/folly/gen/Core-inl.h b/folly/gen/Core-inl.h index f260a55f..d034d20d 100644 --- a/folly/gen/Core-inl.h +++ b/folly/gen/Core-inl.h @@ -47,7 +47,7 @@ class IsCompatibleSignature { class ActualReturn = decltype(std::declval()(std::declval()...)), bool good = std::is_same::value> - static constexpr bool testArgs(int* p) { + static constexpr bool testArgs(int*) { return good; } diff --git a/folly/io/async/AsyncSSLSocket.h b/folly/io/async/AsyncSSLSocket.h index fe72e8f9..315ce84d 100644 --- a/folly/io/async/AsyncSSLSocket.h +++ b/folly/io/async/AsyncSSLSocket.h @@ -99,9 +99,9 @@ class AsyncSSLSocket : public virtual AsyncSocket { * See the passages on verify_callback in SSL_CTX_set_verify(3) * for more details. */ - virtual bool handshakeVer(AsyncSSLSocket* sock, + virtual bool handshakeVer(AsyncSSLSocket* /*sock*/, bool preverifyOk, - X509_STORE_CTX* ctx) noexcept { + X509_STORE_CTX* /*ctx*/) noexcept { return preverifyOk; } diff --git a/folly/io/async/NotificationQueue.h b/folly/io/async/NotificationQueue.h index 46c6a891..8a7219e5 100644 --- a/folly/io/async/NotificationQueue.h +++ b/folly/io/async/NotificationQueue.h @@ -588,7 +588,7 @@ NotificationQueue::Consumer::~Consumer() { } template -void NotificationQueue::Consumer::handlerReady(uint16_t events) +void NotificationQueue::Consumer::handlerReady(uint16_t /*events*/) noexcept { consumeMessages(false); }