Enable -Wextra-semi
authorChristopher Dykes <cdykes@fb.com>
Fri, 9 Dec 2016 19:04:19 +0000 (11:04 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 9 Dec 2016 19:18:01 +0000 (11:18 -0800)
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

12 files changed:
folly/ConcurrentSkipList.h
folly/Range.h
folly/experimental/FutureDAG.h
folly/experimental/symbolizer/Dwarf.h
folly/fibers/Baton.h
folly/futures/Future-inl.h
folly/futures/Future-pre.h
folly/gen/Parallel-inl.h
folly/io/async/AsyncSocket.h
folly/io/async/AsyncTransport.h
folly/ssl/OpenSSLHash.h
folly/test/ContainerTraitsTest.cpp

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