Mark virtual ~Env() override (#9467)

Summary:
**Context:**

Compiling RocksDB with -Winconsistent-missing-destructor-override reveals the following :

```
./include/rocksdb/env.h:174:11: error: '~Env' overrides a destructor but is not marked 'override' [-Werror,-Winconsistent-missing-destructor-override]
  virtual ~Env();
          ^
./include/rocksdb/customizable.h:58:3: note: overridden virtual function is here
  ~Customizable() override {}
```

The need of overriding the Env's destructor seems to be introduced by https://github.com/facebook/rocksdb/pull/9293 and surfaced by -Winconsistent-missing-destructor-override, which is not turned on by default.

**Summary:**
Mark  ~Env() override

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9467

Test Plan: - Turn on -Winconsistent-missing-destructor-override and USE_CLANG=1 make -jN env/env.o to see whether the error shows up

Reviewed By: jay-zhuang, riversand963, george-reynya

Differential Revision: D33864985

Pulled By: hx235

fbshipit-source-id: 4a78bd161ff153902b2676829723e9a1c33dd749
main
Hui Xiao 3 years ago committed by Facebook GitHub Bot
parent f07c56928f
commit a3de7ae49f
  1. 2
      include/rocksdb/env.h

@ -171,7 +171,7 @@ class Env : public Customizable {
Env(const Env&) = delete; Env(const Env&) = delete;
void operator=(const Env&) = delete; void operator=(const Env&) = delete;
virtual ~Env(); ~Env() override;
static const char* Type() { return "Environment"; } static const char* Type() { return "Environment"; }

Loading…
Cancel
Save