]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestor/BitAllocator.h: fix uninitialized member
authorLi Wang <li.wang@kylin-cloud.com>
Fri, 30 Dec 2016 14:15:15 +0000 (14:15 +0000)
committerLi Wang <li.wang@kylin-cloud.com>
Fri, 30 Dec 2016 14:15:15 +0000 (14:15 +0000)
Silence Coverity 1398206

Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
src/os/bluestore/BitAllocator.h

index 38150fbd40e2ca7301d30d876695b75df34aa7f2..350de70ec87f56baa312aeb72c4ee9670d9af219 100644 (file)
@@ -194,6 +194,7 @@ public:
 };
 
 typedef enum bmap_area_type {
+  UNDEFINED = 0,
   ZONE = 1,
   LEAF = 2,
   NON_LEAF = 3
@@ -263,7 +264,7 @@ public:
   int64_t get_level();
   bmap_area_type_t get_type();
   virtual void dump_state(int& count) = 0;
-  BitMapArea(CephContext* cct) : cct(cct) {}
+  BitMapArea(CephContext* cct) : cct(cct), m_type(UNDEFINED) {}
   virtual ~BitMapArea() { }
 };