Commit 10847386 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Enable -Wextra-semi

Summary:
Because the extra semicolons are useless and all typos...
GCC doesn't have this warning. Neither does MSVC, but that won't stop me.

Reviewed By: igorsugak

Differential Revision: D4304218

fbshipit-source-id: a06586edc6b9bafd5dd074e9fd4e0ed152181abc
parent d5c1c794
...@@ -679,7 +679,7 @@ class detail::csl_iterator : ...@@ -679,7 +679,7 @@ class detail::csl_iterator :
friend class boost::iterator_core_access; friend class boost::iterator_core_access;
template<class,class> friend class csl_iterator; template<class,class> friend class csl_iterator;
void increment() { node_ = node_->next(); }; void increment() { node_ = node_->next(); }
bool equal(const csl_iterator& other) const { return node_ == other.node_; } bool equal(const csl_iterator& other) const { return node_ == other.node_; }
value_type& dereference() const { return node_->data(); } value_type& dereference() const { return node_->data(); }
......
...@@ -412,7 +412,7 @@ public: ...@@ -412,7 +412,7 @@ public:
const_range_type castToConst() const { const_range_type castToConst() const {
return const_range_type(*this); return const_range_type(*this);
}; }
// Works only for Range<const char*> and Range<char*> // Works only for Range<const char*> and Range<char*>
int compare(const const_range_type& o) const { int compare(const const_range_type& o) const {
......
...@@ -210,19 +210,19 @@ class FutureDAGFunctor { ...@@ -210,19 +210,19 @@ class FutureDAGFunctor {
std::vector<T> dep_states; std::vector<T> dep_states;
T result() { T result() {
return state; return state;
}; }
// execReset() runs DAG & clears all nodes except for source // execReset() runs DAG & clears all nodes except for source
void execReset() { void execReset() {
this->dag->go().get(); this->dag->go().get();
this->dag->reset(); this->dag->reset();
}; }
void exec() { void exec() {
this->dag->go().get(); this->dag->go().get();
}; }
virtual void operator()(){}; virtual void operator()(){}
explicit FutureDAGFunctor(T init_val) : state(init_val) {} explicit FutureDAGFunctor(T init_val) : state(init_val) {}
FutureDAGFunctor() : state() {} FutureDAGFunctor() : state() {}
virtual ~FutureDAGFunctor(){}; virtual ~FutureDAGFunctor(){}
}; };
} // folly } // folly
...@@ -68,7 +68,7 @@ class Dwarf { ...@@ -68,7 +68,7 @@ class Dwarf {
Path(folly::StringPiece baseDir, folly::StringPiece subDir, Path(folly::StringPiece baseDir, folly::StringPiece subDir,
folly::StringPiece file); folly::StringPiece file);
folly::StringPiece baseDir() const { return baseDir_; }; folly::StringPiece baseDir() const { return baseDir_; }
folly::StringPiece subDir() const { return subDir_; } folly::StringPiece subDir() const { return subDir_; }
folly::StringPiece file() const { return file_; } folly::StringPiece file() const { return file_; }
......
...@@ -154,7 +154,7 @@ class Baton { ...@@ -154,7 +154,7 @@ class Baton {
PreBlockAttempts = 300, PreBlockAttempts = 300,
}; };
explicit Baton(intptr_t state) : waitingFiber_(state){}; explicit Baton(intptr_t state) : waitingFiber_(state){}
void postHelper(intptr_t new_value); void postHelper(intptr_t new_value);
void postThread(); void postThread();
......
...@@ -686,7 +686,7 @@ collectAny(InputIterator first, InputIterator last) { ...@@ -686,7 +686,7 @@ collectAny(InputIterator first, InputIterator last) {
typename std::iterator_traits<InputIterator>::value_type::value_type T; typename std::iterator_traits<InputIterator>::value_type::value_type T;
struct CollectAnyContext { struct CollectAnyContext {
CollectAnyContext() {}; CollectAnyContext() {}
Promise<std::pair<size_t, Try<T>>> p; Promise<std::pair<size_t, Try<T>>> p;
std::atomic<bool> done {false}; std::atomic<bool> done {false};
}; };
...@@ -711,7 +711,7 @@ collectAnyWithoutException(InputIterator first, InputIterator last) { ...@@ -711,7 +711,7 @@ collectAnyWithoutException(InputIterator first, InputIterator last) {
typename std::iterator_traits<InputIterator>::value_type::value_type T; typename std::iterator_traits<InputIterator>::value_type::value_type T;
struct CollectAnyWithoutExceptionContext { struct CollectAnyWithoutExceptionContext {
CollectAnyWithoutExceptionContext(){}; CollectAnyWithoutExceptionContext(){}
Promise<std::pair<size_t, T>> p; Promise<std::pair<size_t, T>> p;
std::atomic<bool> done{false}; std::atomic<bool> done{false};
std::atomic<size_t> nFulfilled{0}; std::atomic<size_t> nFulfilled{0};
...@@ -884,7 +884,7 @@ Future<T> unorderedReduce(It first, It last, T initial, F func) { ...@@ -884,7 +884,7 @@ Future<T> unorderedReduce(It first, It last, T initial, F func) {
UnorderedReduceContext(T&& memo, F&& fn, size_t n) UnorderedReduceContext(T&& memo, F&& fn, size_t n)
: lock_(), memo_(makeFuture<T>(std::move(memo))), : lock_(), memo_(makeFuture<T>(std::move(memo))),
func_(std::move(fn)), numThens_(0), numFutures_(n), promise_() func_(std::move(fn)), numThens_(0), numFutures_(n), promise_()
{}; {}
folly::MicroSpinLock lock_; // protects memo_ and numThens_ folly::MicroSpinLock lock_; // protects memo_ and numThens_
Future<T> memo_; Future<T> memo_;
F func_; F func_;
......
...@@ -71,11 +71,11 @@ struct callableWith { ...@@ -71,11 +71,11 @@ struct callableWith {
template<typename T, template<typename T,
typename = detail::resultOf<T, Args...>> typename = detail::resultOf<T, Args...>>
static constexpr std::true_type static constexpr std::true_type
check(std::nullptr_t) { return std::true_type{}; }; check(std::nullptr_t) { return std::true_type{}; }
template<typename> template<typename>
static constexpr std::false_type static constexpr std::false_type
check(...) { return std::false_type{}; }; check(...) { return std::false_type{}; }
typedef decltype(check<F>(nullptr)) type; typedef decltype(check<F>(nullptr)) type;
static constexpr bool value = type::value; static constexpr bool value = type::value;
......
...@@ -228,7 +228,7 @@ class Parallel : public Operator<Parallel<Ops>> { ...@@ -228,7 +228,7 @@ class Parallel : public Operator<Parallel<Ops>> {
void work() { void work() {
puller_ | *ops_ | pusher_; puller_ | *ops_ | pusher_;
}; }
public: public:
Executor(size_t threads, const Ops* ops) Executor(size_t threads, const Ops* ops)
......
...@@ -603,7 +603,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper { ...@@ -603,7 +603,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
WriteRequest(AsyncSocket* socket, WriteCallback* callback) : WriteRequest(AsyncSocket* socket, WriteCallback* callback) :
socket_(socket), callback_(callback) {} socket_(socket), callback_(callback) {}
virtual void start() {}; virtual void start() {}
virtual void destroy() = 0; virtual void destroy() = 0;
......
...@@ -493,7 +493,7 @@ class AsyncReader { ...@@ -493,7 +493,7 @@ class AsyncReader {
*/ */
virtual void readBufferAvailable(std::unique_ptr<IOBuf> /*readBuf*/) virtual void readBufferAvailable(std::unique_ptr<IOBuf> /*readBuf*/)
noexcept {}; noexcept {}
/** /**
* readEOF() will be invoked when the transport is closed. * readEOF() will be invoked when the transport is closed.
......
...@@ -138,7 +138,7 @@ class OpenSSLHash { ...@@ -138,7 +138,7 @@ class OpenSSLHash {
hmac.hash_init(md, key); hmac.hash_init(md, key);
hmac.hash_update(data); hmac.hash_update(data);
hmac.hash_final(out); hmac.hash_final(out);
}; }
static void hmac( static void hmac(
MutableByteRange out, MutableByteRange out,
const EVP_MD* md, const EVP_MD* md,
......
...@@ -23,7 +23,7 @@ using namespace folly; ...@@ -23,7 +23,7 @@ using namespace folly;
struct Node { struct Node {
size_t copies = 0; size_t copies = 0;
Node() noexcept {}; Node() noexcept {}
Node(const Node& n) noexcept { copies = n.copies; ++copies; } Node(const Node& n) noexcept { copies = n.copies; ++copies; }
Node(Node&& n) noexcept { swap(copies, n.copies); ++copies; } Node(Node&& n) noexcept { swap(copies, n.copies); ++copies; }
}; };
......
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