Commit e5cb25c2 authored by Igor Sugak's avatar Igor Sugak Committed by Facebook GitHub Bot

fix -Wsuggest-override and -Wsuggest-destructor-override

Summary:
```
folly/executors/InlineExecutor.h:29:11: error: '~InlineLikeExecutor' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
  virtual ~InlineLikeExecutor() {}
          ^
folly/Executor.h:57:11: note: overridden virtual function is here
  virtual ~Executor() {}
          ^
In file included from tupperware/agent/system/Mounts.cpp:18:
In file included from folly/futures/Future.h:36:
In file included from folly/fibers/Baton.h:297:
In file included from folly/fibers/Baton-inl.h:19:
folly/fibers/FiberManagerInternal.h:588:10: error: 'timeoutExpired' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    void timeoutExpired() noexcept { run(); }
         ^
folly/io/async/HHWheelTimer.h:95:18: note: overridden virtual function is here
    virtual void timeoutExpired() noexcept = 0;
                 ^
In file included from tupperware/agent/system/Mounts.cpp:18:
In file included from folly/futures/Future.h:36:
In file included from folly/fibers/Baton.h:297:
In file included from folly/fibers/Baton-inl.h:19:
folly/fibers/FiberManagerInternal.h:589:10: error: 'callbackCanceled' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    void callbackCanceled() noexcept {}
         ^
folly/io/async/HHWheelTimer.h:100:18: note: overridden virtual function is here
    virtual void callbackCanceled() noexcept { timeoutExpired(); }
                 ^
3 errors generated.
```

Reviewed By: simpkins

Differential Revision: D27988235

fbshipit-source-id: 799484c52f89fa20f647ff0801b8d136b657b395
parent 4794b98c
...@@ -26,7 +26,7 @@ namespace folly { ...@@ -26,7 +26,7 @@ namespace folly {
class InlineLikeExecutor : public virtual Executor { class InlineLikeExecutor : public virtual Executor {
public: public:
virtual ~InlineLikeExecutor() {} virtual ~InlineLikeExecutor() override {}
}; };
/// When work is "queued", execute it immediately inline. /// When work is "queued", execute it immediately inline.
......
...@@ -585,8 +585,8 @@ class FiberManager : public ::folly::Executor { ...@@ -585,8 +585,8 @@ class FiberManager : public ::folly::Executor {
private: private:
FiberManager& fiberManager_; FiberManager& fiberManager_;
void timeoutExpired() noexcept { run(); } void timeoutExpired() noexcept override { run(); }
void callbackCanceled() noexcept {} void callbackCanceled() noexcept override {}
}; };
FibersPoolResizer fibersPoolResizer_; FibersPoolResizer fibersPoolResizer_;
......
...@@ -64,7 +64,7 @@ class LogStream : public std::ostream { ...@@ -64,7 +64,7 @@ class LogStream : public std::ostream {
// bloat, with minimal benefit--for debug log statements these never even get // bloat, with minimal benefit--for debug log statements these never even get
// called in the common case where the log statement is disabled. // called in the common case where the log statement is disabled.
explicit LogStream(LogStreamProcessor* processor); explicit LogStream(LogStreamProcessor* processor);
~LogStream(); ~LogStream() override;
bool empty() const { return buffer_.empty(); } bool empty() const { return buffer_.empty(); }
......
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