summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoramitkuma <amitkuma@redhat.com>2017-08-09 12:26:30 +0200
committeramitkuma <amitkuma@redhat.com>2017-08-09 12:26:30 +0200
commited39f3cb350e98c4f29ad2e13b2e43f93b60f745 (patch)
treeacaf1fab35ca59c5b367b59488099dce661b8cc4 /src
parentMerge pull request #16900 from liewegas/wip-20925-b (diff)
downloadceph-ed39f3cb350e98c4f29ad2e13b2e43f93b60f745.tar.xz
ceph-ed39f3cb350e98c4f29ad2e13b2e43f93b60f745.zip
rgw: Initialization of members rgw_sync, rgw_rados
Fixes the coverity issues: ** 1355581 Uninitialized scalar field CID 1355581 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member cur_shard is not initialized in this constructor nor in any functions that it calls. ** 1356907 Uninitialized scalar field 2. uninit_member: Non-static class member field mtime.tv_sec is not initialized in this constructor nor in any functions that it calls. CID 1356907 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 4. uninit_member: Non-static class member field mtime.tv_nsec is not initialized in this constructor nor in any functions that it calls Signed-off-by: Amit Kumar amitkuma@redhat.com
Diffstat (limited to 'src')
-rw-r--r--src/rgw/rgw_rados.h2
-rw-r--r--src/rgw/rgw_sync.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index a356a456b4d..bf538133b2b 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -2855,7 +2855,7 @@ public:
RGWObjManifest manifest;
bool has_manifest;
uint64_t size;
- struct timespec mtime;
+ struct timespec mtime {};
map<string, bufferlist> attrs;
Result() : has_manifest(false), size(0) {}
diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h
index c651f7a9ad1..b684f9fc765 100644
--- a/src/rgw/rgw_sync.h
+++ b/src/rgw/rgw_sync.h
@@ -437,7 +437,7 @@ public:
};
class RGWShardCollectCR : public RGWCoroutine {
- int cur_shard;
+ int cur_shard = 0;
int current_running;
int max_concurrent;
int status;