Commit 89282758 authored by Ondrej Lehecka's avatar Ondrej Lehecka Committed by facebook-github-bot-4

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
parent 4ae8db54
......@@ -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
......
......@@ -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...);
}
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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);
}
};
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment