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
1 changed files with 2 additions and 0 deletions

View File

@ -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;