]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Initialize pointer field in req_state
authorJos Collin <jcollin@redhat.com>
Thu, 29 Jun 2017 14:50:08 +0000 (20:20 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 12 Jul 2017 16:03:04 +0000 (21:33 +0530)
Fixes the Coverity Scan Report:
CID 1352183: Uninitialized pointer field (UNINIT_CTOR)
4. uninit_member: Non-static class member req is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member op_type is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/rgw/rgw_common.h

index ef766d4d76a5489d9ae29d38e34ea6d7b142d96f..699cd19788b7a33d2b6ab4839925283c72549402 100644 (file)
@@ -1722,9 +1722,9 @@ class RGWRequest;
 struct req_state {
   CephContext *cct;
   rgw::io::BasicClient *cio;
-  RGWRequest *req; /// XXX: re-remove??
+  RGWRequest *req{nullptr}; /// XXX: re-remove??
   http_op op;
-  RGWOpType op_type;
+  RGWOpType op_type{};
   bool content_started;
   int format;
   ceph::Formatter *formatter;