From: Jos Collin Date: Thu, 29 Jun 2017 14:50:08 +0000 (+0530) Subject: rgw: Initialize pointer field in req_state X-Git-Tag: v12.1.1~41^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d181b81aba5228e966a26e55b68f5d60a017f95;p=ceph.git rgw: Initialize pointer field in req_state 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 --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index ef766d4d76a5..699cd19788b7 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -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;