From 3d181b81aba5228e966a26e55b68f5d60a017f95 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Thu, 29 Jun 2017 20:20:08 +0530 Subject: [PATCH] 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 --- src/rgw/rgw_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index ef766d4d76a54..699cd19788b7a 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; -- 2.39.5