From 635154561b3bdc2219e9c9093025c695bdf8d065 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Thu, 4 May 2017 17:58:12 +0200 Subject: [PATCH] Finisher: fix uninitialized variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/Finisher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) { -- 2.47.3