Fix the gcc warning for unused variable

Summary: Fix the unused variable warning for `first` when running `make release`

Test Plan:
make
make check

Reviewers: dhruba, igor

CC: leveldb

Differential Revision: https://reviews.facebook.net/D13695
main
Kai Liu 11 years ago
parent 56305221c4
commit 39c14891b6
  1. 10
      db/memtablelist.cc

@ -96,14 +96,12 @@ Status MemTableList::InstallMemtableFlushResults(
} }
// flush was sucessful // flush was sucessful
bool first = true; for (size_t i = 0; i < mems.size(); ++i) {
for (MemTable* m : mems) {
// All the edits are associated with the first memtable of this batch. // All the edits are associated with the first memtable of this batch.
assert(first || m->GetEdits()->NumEntries() == 0); assert(i == 0 || m->GetEdits()->NumEntries() == 0);
first = false;
m->flush_completed_ = true; mems[i]->flush_completed_ = true;
m->file_number_ = file_number; mems[i]->file_number_ = file_number;
} }
// if some other thread is already commiting, then return // if some other thread is already commiting, then return

Loading…
Cancel
Save