]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap.cc: uninit vars in ctor struct qi
authorSamuel Just <sam.just@inktank.com>
Wed, 29 Aug 2012 23:23:53 +0000 (16:23 -0700)
committerSage Weil <sage@inktank.com>
Fri, 31 Aug 2012 20:11:36 +0000 (13:11 -0700)
CID 717337: Uninitialized scalar field (UNINIT_CTOR)At (6): Non-static class
member "weight" is not initialized in this constructor nor in any functions
that it calls.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSDMap.cc

index 960f02d9b8a210cecdad38447cc4388caf42a94c..e89129283d726d49cfb1a09214948a41ec920613 100644 (file)
@@ -1278,7 +1278,7 @@ struct qi {
   int item;
   int depth;
   float weight;
-  qi() {}
+  qi() : item(0), depth(0), weight(0) {}
   qi(int i, int d, float w) : item(i), depth(d), weight(w) {}
 };