diff --git a/db/compaction_job.cc b/db/compaction_job.cc index 8886e18c4..112e6b45e 100644 --- a/db/compaction_job.cc +++ b/db/compaction_job.cc @@ -297,6 +297,7 @@ CompactionJob::CompactionJob( snapshot_checker_(snapshot_checker), table_cache_(std::move(table_cache)), event_logger_(event_logger), + bottommost_level_(false), paranoid_file_checks_(paranoid_file_checks), measure_io_stats_(measure_io_stats), write_hint_(Env::WLTH_NOT_SET) { diff --git a/db/compaction_picker_universal.cc b/db/compaction_picker_universal.cc index 14533fbcd..29632b745 100644 --- a/db/compaction_picker_universal.cc +++ b/db/compaction_picker_universal.cc @@ -35,7 +35,7 @@ namespace { // and the index of the file in that level struct InputFileInfo { - InputFileInfo() : f(nullptr) {} + InputFileInfo() : f(nullptr), level(0), index(0) {} FileMetaData* f; size_t level; diff --git a/db/dbformat.h b/db/dbformat.h index ac021d945..884a72d37 100644 --- a/db/dbformat.h +++ b/db/dbformat.h @@ -87,7 +87,7 @@ struct ParsedInternalKey { ParsedInternalKey() : sequence(kMaxSequenceNumber) // Make code analyzer happy - {} // Intentionally left uninitialized (for speed) + {} // Intentionally left uninitialized (for speed) ParsedInternalKey(const Slice& u, const SequenceNumber& seq, ValueType t) : user_key(u), sequence(seq), type(t) { } std::string DebugString(bool hex = false) const;