]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/DecayCounter.cc: init variable to silence cppcheck
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 12 Apr 2018 18:28:00 +0000 (20:28 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 12 Apr 2018 18:33:52 +0000 (20:33 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/common/DecayCounter.cc

index 1f0f12e85cf3eb742d8f8ac164fd72db88e6f8a2..86562b3e99a15837207efbb8af637b77dbc2da28 100644 (file)
@@ -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);