Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverity issues compaction_job, compaction_picker #3091

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions db/compaction_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,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) {
assert(log_buffer_ != nullptr);
Expand Down
2 changes: 1 addition & 1 deletion db/compaction_picker_universal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion db/dbformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,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;
Expand Down