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...> :
template <typename Ex>
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->throwfn_ = folly::detail::Thrower<Ex>::doThrow;
}
......
......@@ -37,7 +37,7 @@ class Executor {
/// Enqueue a function with a given priority, where 0 is the medium priority
/// 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(
"addWithPriority() is not implemented for this Executor");
}
......
......@@ -999,7 +999,7 @@ private:
public:
// 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)
......@@ -1023,7 +1023,7 @@ public:
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
? traits_type::length(s)
: (std::__throw_logic_error(
......@@ -1031,7 +1031,7 @@ public:
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) {
}
......
......@@ -654,7 +654,7 @@ private:
}
// 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) {
// used memcpy; data has been relocated, do not call destructor
} else {
......
......@@ -108,7 +108,7 @@ class BaseFormatter {
template <size_t K, class Callback>
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);
}
......
......@@ -30,8 +30,8 @@ struct Unit {
template <class T> struct Drop : public std::false_type {
using type = T;
};
bool operator==(const Unit& other) const { return true; }
bool operator!=(const Unit& other) const { return false; }
bool operator==(const Unit& /*other*/) const { return true; }
bool operator!=(const Unit& /*other*/) const { return false; }
};
// Lift void into Unit.
......
......@@ -363,7 +363,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
bool isEorTrackingEnabled() const override { return false; }
void setEorTracking(bool track) override {}
void setEorTracking(bool /*track*/) override {}
bool connecting() const override {
return (state_ == StateEnum::CONNECTING);
......
......@@ -430,7 +430,7 @@ class AsyncTransportWrapper : virtual public AsyncTransport {
* @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 {};
/**
......
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