From: Danny Al-Gaaf Date: Thu, 8 May 2014 13:54:24 +0000 (+0200) Subject: ObjectCacher::_wait_for_write(): init 'bool done' X-Git-Tag: v0.81~45^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cfc885fa56e528b38e90a6304b2ac1f5770a44cc;p=ceph.git ObjectCacher::_wait_for_write(): init 'bool done' Init 'bool done' with 'false' to fix: osdc/Objecter.h:915:27: warning: implicit conversion los: variable 'done' may be uninitialized when used here [-Wconditional-uninitialized] while (!done) ^~~~ osdc/ObjectCacher.cc:1399:14: note: initialize the variable 'done' to silence this warning bool done; ^ = false Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index cc5928416199..e0273bc5314a 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1396,7 +1396,7 @@ int ObjectCacher::_wait_for_write(OSDWrite *wr, uint64_t len, ObjectSet *oset, M } else { // write-thru! flush what we just wrote. Cond cond; - bool done; + bool done = false; Context *fin = block_writes_upfront ? new C_Cond(&cond, &done, &ret) : onfreespace; assert(fin);