Initialize cache dumper `DumpUnit` in constructor (#9014)

Summary:
Should fix clang-analyze:

```
utilities/cache_dump_load_impl.cc:296:38: warning: The left operand of '!=' is a garbage value
  while (io_s.ok() && dump_unit.type != CacheDumpUnitType::kFooter) {
                      ~~~~~~~~~~~~~~ ^
```

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

Reviewed By: zhichao-cao

Differential Revision: D31546912

Pulled By: ajkr

fbshipit-source-id: a2e0dc7874e8c1c6abf190862b5d49e6a6ad6d01
main
Andrew Kryczka 3 years ago committed by Facebook GitHub Bot
parent 6c3bf83d6f
commit ee239df351
  1. 2
      utilities/cache_dump_load_impl.h

@ -79,6 +79,8 @@ struct DumpUnit {
// address of the begin of the block in this string.
void* value;
DumpUnit() { reset(); }
void reset() {
timestamp = 0;
type = CacheDumpUnitType::kBlockTypeMax;

Loading…
Cancel
Save