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

fixing compiler errors when compiling with Wunused-parameter

Summary: fixing C++ compiler warnings for the -Wunused-parameter warning switch on.
This is fixing only the header files, not the library cpp files.

Reviewed By: @yfeldblum

Differential Revision: D2259957
parent 0d67e78b
...@@ -414,7 +414,7 @@ class try_and_catch<LastException, Exceptions...> : ...@@ -414,7 +414,7 @@ class try_and_catch<LastException, Exceptions...> :
template <typename Ex> template <typename Ex>
typename std::enable_if<exception_wrapper::optimize<Ex>::value>::type typename std::enable_if<exception_wrapper::optimize<Ex>::value>::type
assign_exception(Ex& e, std::exception_ptr eptr) { assign_exception(Ex& e, std::exception_ptr /*eptr*/) {
this->item_ = std::make_shared<Ex>(e); this->item_ = std::make_shared<Ex>(e);
this->throwfn_ = folly::detail::Thrower<Ex>::doThrow; this->throwfn_ = folly::detail::Thrower<Ex>::doThrow;
} }
......
...@@ -37,7 +37,7 @@ class Executor { ...@@ -37,7 +37,7 @@ class Executor {
/// Enqueue a function with a given priority, where 0 is the medium priority /// Enqueue a function with a given priority, where 0 is the medium priority
/// This is up to the implementation to enforce /// This is up to the implementation to enforce
virtual void addWithPriority(Func, int8_t priority) { virtual void addWithPriority(Func, int8_t /*priority*/) {
throw std::runtime_error( throw std::runtime_error(
"addWithPriority() is not implemented for this Executor"); "addWithPriority() is not implemented for this Executor");
} }
......
...@@ -999,7 +999,7 @@ private: ...@@ -999,7 +999,7 @@ private:
public: public:
// C++11 21.4.2 construct/copy/destroy // C++11 21.4.2 construct/copy/destroy
explicit basic_fbstring(const A& a = A()) noexcept { explicit basic_fbstring(const A& /*a*/ = A()) noexcept {
} }
basic_fbstring(const basic_fbstring& str) basic_fbstring(const basic_fbstring& str)
...@@ -1023,7 +1023,7 @@ public: ...@@ -1023,7 +1023,7 @@ public:
assign(str, pos, n); assign(str, pos, n);
} }
/* implicit */ basic_fbstring(const value_type* s, const A& a = A()) /* implicit */ basic_fbstring(const value_type* s, const A& /*a*/ = A())
: store_(s, s : store_(s, s
? traits_type::length(s) ? traits_type::length(s)
: (std::__throw_logic_error( : (std::__throw_logic_error(
...@@ -1031,7 +1031,7 @@ public: ...@@ -1031,7 +1031,7 @@ public:
0)) { 0)) {
} }
basic_fbstring(const value_type* s, size_type n, const A& a = A()) basic_fbstring(const value_type* s, size_type n, const A& /*a*/ = A())
: store_(s, n) { : store_(s, n) {
} }
......
...@@ -654,7 +654,7 @@ private: ...@@ -654,7 +654,7 @@ private:
} }
// done // done
void relocate_done(T* dest, T* first, T* last) noexcept { void relocate_done(T* /*dest*/, T* first, T* last) noexcept {
if (folly::IsRelocatable<T>::value && usingStdAllocator::value) { if (folly::IsRelocatable<T>::value && usingStdAllocator::value) {
// used memcpy; data has been relocated, do not call destructor // used memcpy; data has been relocated, do not call destructor
} else { } else {
......
...@@ -108,7 +108,7 @@ class BaseFormatter { ...@@ -108,7 +108,7 @@ class BaseFormatter {
template <size_t K, class Callback> template <size_t K, class Callback>
typename std::enable_if<K == valueCount>::type typename std::enable_if<K == valueCount>::type
doFormatFrom(size_t i, FormatArg& arg, Callback& cb) const { doFormatFrom(size_t i, FormatArg& arg, Callback& /*cb*/) const {
arg.error("argument index out of range, max=", i); arg.error("argument index out of range, max=", i);
} }
......
...@@ -30,8 +30,8 @@ struct Unit { ...@@ -30,8 +30,8 @@ struct Unit {
template <class T> struct Drop : public std::false_type { template <class T> struct Drop : public std::false_type {
using type = T; using type = T;
}; };
bool operator==(const Unit& other) const { return true; } bool operator==(const Unit& /*other*/) const { return true; }
bool operator!=(const Unit& other) const { return false; } bool operator!=(const Unit& /*other*/) const { return false; }
}; };
// Lift void into Unit. // Lift void into Unit.
......
...@@ -363,7 +363,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper { ...@@ -363,7 +363,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
bool isEorTrackingEnabled() const override { return false; } bool isEorTrackingEnabled() const override { return false; }
void setEorTracking(bool track) override {} void setEorTracking(bool /*track*/) override {}
bool connecting() const override { bool connecting() const override {
return (state_ == StateEnum::CONNECTING); return (state_ == StateEnum::CONNECTING);
......
...@@ -430,7 +430,7 @@ class AsyncTransportWrapper : virtual public AsyncTransport { ...@@ -430,7 +430,7 @@ class AsyncTransportWrapper : virtual public AsyncTransport {
* @param readBuf The unique pointer of read buffer. * @param readBuf The unique pointer of read buffer.
*/ */
virtual void readBufferAvailable(std::unique_ptr<IOBuf> readBuf) virtual void readBufferAvailable(std::unique_ptr<IOBuf> /*readBuf*/)
noexcept {}; noexcept {};
/** /**
......
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