Build fix.

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:
This commit is contained in:
krad 2015-07-14 14:26:53 -07:00
parent 2c8de0ecae
commit c613960690

View file

@ -47,6 +47,8 @@ uint64_t TotalCompensatedFileSize(const std::vector<FileMetaData*>& files) {
// and the index of the file in that level // and the index of the file in that level
struct InputFileInfo { struct InputFileInfo {
InputFileInfo() : f(nullptr) {}
FileMetaData* f; FileMetaData* f;
size_t level; size_t level;
size_t index; size_t index;