From: Danny Al-Gaaf Date: Thu, 12 Apr 2018 18:28:00 +0000 (+0200) Subject: common/DecayCounter.cc: init variable to silence cppcheck X-Git-Tag: v13.1.0~237^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b6bb4bc6fa0a93f7b21f94ccea64fa2ed0aaf9a;p=ceph.git common/DecayCounter.cc: init variable to silence cppcheck Signed-off-by: Danny Al-Gaaf --- diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index 1f0f12e85cf3..86562b3e99a1 100644 --- a/src/common/DecayCounter.cc +++ b/src/common/DecayCounter.cc @@ -28,11 +28,11 @@ void DecayCounter::decode(const utime_t &t, bufferlist::iterator &p) { DECODE_START_LEGACY_COMPAT_LEN(4, 4, 4, p); if (struct_v < 2) { - double half_life; + double half_life = 0.0; decode(half_life, p); } if (struct_v < 3) { - double k; + double k = 0.0; decode(k, p); } decode(val, p);