From 590fadc4076d2eb3ca46e7f73b7b132da4707c86 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Fri, 10 Apr 2015 15:14:27 -0700 Subject: [PATCH] Fix compile warning on CLANG Summary: oops Test Plan: compiles now Reviewers: sdong, yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36867 --- db/compaction_picker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/compaction_picker.cc b/db/compaction_picker.cc index 540d3b405..f8ee0f7f5 100644 --- a/db/compaction_picker.cc +++ b/db/compaction_picker.cc @@ -682,7 +682,7 @@ Compaction* LevelCompactionPicker::PickCompaction( int parent_index = -1; int base_index = -1; CompactionInputFiles inputs; - double score; + double score = 0; // Find the compactions by size on all levels. for (int i = 0; i < NumberLevels() - 1; i++) { @@ -819,7 +819,7 @@ bool LevelCompactionPicker::PickCompactionBySize(VersionStorageInfo* vstorage, // could be made better by looking at key-ranges that are // being compacted at level 0. if (level == 0 && !level0_compactions_in_progress_.empty()) { - return nullptr; + return false; } assert(level >= 0);