Skip to content

Commit

Permalink
Fix valgrind - Initialize done variable
Browse files Browse the repository at this point in the history
Summary: Fixes the valgrind warning "Conditional jump or move depends on uninitialised value(s)"

Test Plan: valgrind test, no more warning

Reviewers: sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D48177
  • Loading branch information
igorcanadi committed Oct 5, 2015
1 parent 5c7bf56 commit bf19dbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9649,7 +9649,7 @@ TEST_F(DBTest, PauseBackgroundWorkTest) {
Reopen(options);

std::vector<std::thread> threads;
std::atomic<bool> done;
std::atomic<bool> done(false);
db_->PauseBackgroundWork();
threads.emplace_back([&]() {
Random rnd(301);
Expand Down

0 comments on commit bf19dbf

Please sign in to comment.