From: amitkuma Date: Wed, 9 Aug 2017 12:54:47 +0000 (+0530) Subject: rgw: Intializing is_master, max_aio X-Git-Tag: v13.0.1~1149^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4517e03d3b8be2249d62b8445be7c66ccd1fb2f3;p=ceph.git rgw: Intializing is_master, max_aio Fixes the coverity issue: ** 1396142 Uninitialized scalar field CID 1396142 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member max_aio is not initialized in this constructor nor in any functions that it calls. ** 1396205 Uninitialized scalar field CID 1396205 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member is_master is not initialized in this constructor nor in any functions that it calls. ** 1396150 Uninitialized scalar field CID 1396150 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member size is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar amitkuma@redhat.com --- diff --git a/src/rgw/rgw_bucket.h b/src/rgw/rgw_bucket.h index 6cc20eb8f61..e0c9bb5c969 100644 --- a/src/rgw/rgw_bucket.h +++ b/src/rgw/rgw_bucket.h @@ -199,7 +199,7 @@ struct RGWBucketAdminOpState { bool fix_index; bool delete_child_objects; bool bucket_stored; - int max_aio; + int max_aio = 0; rgw_bucket bucket; diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index a356a456b4d..da1173c8aec 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -1450,7 +1450,7 @@ WRITE_CLASS_ENCODER(RGWZoneGroupPlacementTarget) struct RGWZoneGroup : public RGWSystemMetaObj { string api_name; list endpoints; - bool is_master; + bool is_master = false; string master_zone; map zones; diff --git a/src/rgw/rgw_sync_module.h b/src/rgw/rgw_sync_module.h index 278d1df3893..cab2eb5d9bb 100644 --- a/src/rgw/rgw_sync_module.h +++ b/src/rgw/rgw_sync_module.h @@ -109,7 +109,7 @@ protected: rgw_obj_key key; ceph::real_time mtime; - uint64_t size; + uint64_t size = 0; map attrs; public: RGWStatRemoteObjCBCR(RGWDataSyncEnv *_sync_env,