]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ObjectCacher::_wait_for_write(): init 'bool done'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 8 May 2014 13:54:24 +0000 (15:54 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 8 May 2014 13:54:24 +0000 (15:54 +0200)
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 <danny.al-gaaf@bisect.de>
src/osdc/ObjectCacher.cc

index cc59284161998b5246192f57541f865a3ea5f577..e0273bc5314a49f64494c789fdd4bb2cab7442ca 100644 (file)
@@ -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);