Skip to content

Commit

Permalink
Build fix.
Browse files Browse the repository at this point in the history
Summary: gcc-4.9-glibc-2.20 complains about uninitialized variable.

db/compaction_picker.cc: In member function 'bool
rocksdb::CompactionPicker::IsInputNonOverlapping(rocksdb::Compaction*)':
db/compaction_picker.cc:1174:17: error:
'prev.rocksdb::{anonymous}::InputFileInfo::f' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
   InputFileInfo prev, curr, next;

Test Plan: pmake on local environment

Reviewers: sdong igor

CC: leveldb@

Task ID: #

Blame Rev:
  • Loading branch information
krad committed Jul 15, 2015
1 parent 2c8de0e commit c613960
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/compaction_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ uint64_t TotalCompensatedFileSize(const std::vector<FileMetaData*>& files) {
// and the index of the file in that level

struct InputFileInfo {
InputFileInfo() : f(nullptr) {}

FileMetaData* f;
size_t level;
size_t index;
Expand Down

0 comments on commit c613960

Please sign in to comment.