From: Piotr Dałek Date: Thu, 4 May 2017 15:58:12 +0000 (+0200) Subject: Finisher: fix uninitialized variable warning X-Git-Tag: v12.0.3~70^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14958%2Fhead;p=ceph.git Finisher: fix uninitialized variable warning This silences the following warning: Finisher.cc: In member function ‘void* Finisher::finisher_thread_entry()’: Finisher.cc:89:42: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] logger->dec(l_finisher_queue_len, count); ^ Signed-off-by: Piotr Dałek --- diff --git a/src/common/Finisher.cc b/src/common/Finisher.cc index 18a423d6af99..d7220d10cd00 100644 --- a/src/common/Finisher.cc +++ b/src/common/Finisher.cc @@ -47,7 +47,7 @@ void *Finisher::finisher_thread_entry() ldout(cct, 10) << "finisher_thread start" << dendl; utime_t start; - uint64_t count; + uint64_t count = 0; while (!finisher_stop) { /// Every time we are woken up, we process the queue until it is empty. while (!finisher_queue.empty()) {