From: amitkuma Date: Wed, 13 Sep 2017 11:31:08 +0000 (+0530) Subject: osd: Initialization of data members X-Git-Tag: v13.0.2~790^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de90bd6283999ed1dc93c9b247f45d5f628fa535;p=ceph.git osd: Initialization of data members Fixes the coverity issues: ** 717336 Uninitialized scalar field CID 717336 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member whitelisted is not initialized in this constructor nor in any functions that it calls. ** 728001 Uninitialized scalar field CID 728001 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member priority is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar --- diff --git a/src/osd/ClassHandler.h b/src/osd/ClassHandler.h index 12de083e3d2e..64393a7eb97f 100644 --- a/src/osd/ClassHandler.h +++ b/src/osd/ClassHandler.h @@ -59,7 +59,7 @@ public: ClassHandler *handler; void *handle; - bool whitelisted; + bool whitelisted = false; map methods_map; map filters_map; diff --git a/src/osd/PG.h b/src/osd/PG.h index 2cf90d48b194..836f72c7462b 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1220,7 +1220,7 @@ public: bool must_scrub, must_deep_scrub, must_repair; // Priority to use for scrub scheduling - unsigned priority; + unsigned priority = 0; // this flag indicates whether we would like to do auto-repair of the PG or not bool auto_repair;