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:
main
krad 10 years ago
parent 2c8de0ecae
commit c613960690
  1. 2
      db/compaction_picker.cc

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

Loading…
Cancel
Save