making thrift and folly header files compile clean with -Wunused-parameter
authorOndrej Lehecka <lehecka@fb.com>
Wed, 22 Jul 2015 18:57:18 +0000 (11:57 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Wed, 22 Jul 2015 20:22:22 +0000 (13:22 -0700)
Summary: fixing compiler errors when compiling with Wunused-parameter

Reviewed By: @yfeldblum

Differential Revision: D2267014

folly/AtomicHashArray.h
folly/Conv.h
folly/FBString.h
folly/Traits.h
folly/detail/ThreadLocalDetail.h
folly/dynamic-inl.h
folly/gen/Core-inl.h
folly/io/async/AsyncSSLSocket.h
folly/io/async/NotificationQueue.h

index bbb3cdd4a332ca14ffb143a600c4dc822660f9a9..7f12f862ca1af68e0fc5d5b0de24af5ad6e0886b 100644 (file)
@@ -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
index ccb394b9bcb9114c8a66ee78dcba31e0fa533beb..2991f02e4d13b61b673984df28f8cefaa430e245 100644 (file)
@@ -153,7 +153,7 @@ template <class T, class... Ts>
 typename std::tuple_element<
   sizeof...(Ts),
   std::tuple<T, Ts...> >::type const&
-  getLastElement(const T& v, const Ts&... vs) {
+  getLastElement(const T&, const Ts&... vs) {
   return getLastElement(vs...);
 }
 
index 23bfeb47b816002e5b80ef5bed7917b5b5e9a45f..c43460a2a5fb13632fffcea9d7475ba8162b51e1 100644 (file)
@@ -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<typename std::remove_const<InIt>::type,
-                 value_type*>::value, const A>::type & a = A()) {
+                 value_type*>::value, const A>::type & /*a*/ = A()) {
     assign(begin, end);
   }
 
index fd2be06beefb7a2649fa43ed432597105569e6ba..0a291024baf55b48421e579dc0633f6559f9b01b 100644 (file)
@@ -309,7 +309,7 @@ struct is_negative_impl {
 
 template <typename T>
 struct is_negative_impl<T, false> {
-  constexpr static bool check(T x) { return false; }
+  constexpr static bool check(T) { return false; }
 };
 
 // folly::to integral specializations can end up generating code
index 6769410be67e6ff3b4d6317abc5727330f488963..42c0a2d008ebd4c68b60fbce7bfd07fb0a9b90b6 100644 (file)
@@ -60,7 +60,7 @@ class DeleterBase {
 template <class Ptr>
 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>(ptr);
   }
 };
index 324e7118ca3a7b8ca060450814ec10bfd3519f57..6db141bec9784fd49e3dfc5037c043f23ffa5603 100644 (file)
@@ -404,7 +404,7 @@ struct dynamic::CompareOp {
 };
 template<>
 struct dynamic::CompareOp<dynamic::ObjectImpl> {
-  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;
   }
index f260a55f8853a3aaaa1d571c88255781e326150c..d034d20dce30160bcf6970e9c42548cdb897a1dc 100644 (file)
@@ -47,7 +47,7 @@ class IsCompatibleSignature<Candidate, ExpectedReturn(ArgTypes...)> {
            class ActualReturn =
              decltype(std::declval<F>()(std::declval<ArgTypes>()...)),
            bool good = std::is_same<ExpectedReturn, ActualReturn>::value>
-  static constexpr bool testArgs(int* p) {
+  static constexpr bool testArgs(int*) {
     return good;
   }
 
index fe72e8f902ca5fba600ade7f9e37a2051abc096e..315ce84d708d794a3ea4b657efdef73921692a49 100644 (file)
@@ -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;
     }
 
index 46c6a8911492e84e535264742bc4e1bf4c0b3f65..8a7219e53ad2134d76d8080ea1dc9d8bf7c1cfb1 100644 (file)
@@ -588,7 +588,7 @@ NotificationQueue<MessageT>::Consumer::~Consumer() {
 }
 
 template<typename MessageT>
-void NotificationQueue<MessageT>::Consumer::handlerReady(uint16_t events)
+void NotificationQueue<MessageT>::Consumer::handlerReady(uint16_t /*events*/)
     noexcept {
   consumeMessages(false);
 }