]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Intializing is_master, max_aio
authoramitkuma <amitkuma@redhat.com>
Wed, 9 Aug 2017 12:54:47 +0000 (18:24 +0530)
committeramitkuma <amitkuma@redhat.com>
Thu, 10 Aug 2017 14:22:50 +0000 (19:52 +0530)
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
src/rgw/rgw_bucket.h
src/rgw/rgw_rados.h
src/rgw/rgw_sync_module.h

index 6cc20eb8f6149107e5b6900fc1b85f2c3accb978..e0c9bb5c969a937f5375824316ba6372252210d3 100644 (file)
@@ -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;
 
index a356a456b4d137de4fa18ae4ff7e7cd4465356b6..da1173c8aec2d4b074d80191cca1a1b8678e87fd 100644 (file)
@@ -1450,7 +1450,7 @@ WRITE_CLASS_ENCODER(RGWZoneGroupPlacementTarget)
 struct RGWZoneGroup : public RGWSystemMetaObj {
   string api_name;
   list<string> endpoints;
-  bool is_master;
+  bool is_master = false;
 
   string master_zone;
   map<string, RGWZone> zones;
index 278d1df389315ee5bb4ab03ac2353a82486dd415..cab2eb5d9bb63b1a8d2565d1fbb76b5227ca1e2c 100644 (file)
@@ -109,7 +109,7 @@ protected:
   rgw_obj_key key;
 
   ceph::real_time mtime;
-  uint64_t size;
+  uint64_t size = 0;
   map<string, bufferlist> attrs;
 public:
   RGWStatRemoteObjCBCR(RGWDataSyncEnv *_sync_env,