From c613960690f53aa15e570faf095971963cc564a7 Mon Sep 17 00:00:00 2001 From: krad Date: Tue, 14 Jul 2015 14:26:53 -0700 Subject: [PATCH] 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: --- db/compaction_picker.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/compaction_picker.cc b/db/compaction_picker.cc index 72ba5f7dd..13e3d94c2 100644 --- a/db/compaction_picker.cc +++ b/db/compaction_picker.cc @@ -47,6 +47,8 @@ uint64_t TotalCompensatedFileSize(const std::vector& files) { // and the index of the file in that level struct InputFileInfo { + InputFileInfo() : f(nullptr) {} + FileMetaData* f; size_t level; size_t index;