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
This commit is contained in:
parent
6c3bf83d6f
commit
ee239df351
@ -79,6 +79,8 @@ struct DumpUnit {
|
|||||||
// address of the begin of the block in this string.
|
// address of the begin of the block in this string.
|
||||||
void* value;
|
void* value;
|
||||||
|
|
||||||
|
DumpUnit() { reset(); }
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
timestamp = 0;
|
timestamp = 0;
|
||||||
type = CacheDumpUnitType::kBlockTypeMax;
|
type = CacheDumpUnitType::kBlockTypeMax;
|
||||||
|
Loading…
Reference in New Issue
Block a user