mirror of
https://github.com/ceph/ceph
synced 2025-01-12 14:10:27 +00:00
Merge pull request #52254 from vedanshbhartia/coverity_uninit
rgw: Add coverity uninitialized variable and initialize RGWBucketEntryMetadataObject reviewed-by: yuvalif
This commit is contained in:
commit
d05fa0bea9
@ -2065,7 +2065,7 @@ public:
|
||||
RGWSI_MetaBackend_Handler::Op *op, string& entry,
|
||||
RGWMetadataObject *_obj, RGWObjVersionTracker& objv_tracker,
|
||||
optional_yield y,
|
||||
RGWMDLogSyncType type, bool from_remote_zone) : RGWMetadataHandlerPut_SObj(_handler, op, entry, obj, objv_tracker, y, type, from_remote_zone),
|
||||
RGWMDLogSyncType type, bool from_remote_zone) : RGWMetadataHandlerPut_SObj(_handler, op, entry, _obj, objv_tracker, y, type, from_remote_zone),
|
||||
bhandler(_handler) {
|
||||
obj = static_cast<RGWBucketEntryMetadataObject *>(_obj);
|
||||
}
|
||||
|
@ -416,6 +416,7 @@ RGWKMIPManagerImpl::add_request(RGWKMIPTransceiver *req)
|
||||
return -ECANCELED;
|
||||
// requests is a boost::intrusive::list, which manages pointers and does not copy the instance
|
||||
// coverity[leaked_storage:SUPPRESS]
|
||||
// coverity[uninit_use_in_call:SUPPRESS]
|
||||
requests.push_back(*new Request{*req});
|
||||
l.unlock();
|
||||
if (worker)
|
||||
|
@ -124,6 +124,7 @@ int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const RGWAcc
|
||||
}
|
||||
std::string service = "iam";
|
||||
RGWRESTSimpleRequest req(cct, info.method, url, NULL, ¶ms, api_name);
|
||||
// coverity[uninit_use_in_call:SUPPRESS]
|
||||
return req.forward_request(dpp, key, info, max_response, inbl, outbl, y, service);
|
||||
}
|
||||
|
||||
@ -143,6 +144,7 @@ int RGWRESTConn::put_obj_send_init(const rgw_obj& obj, const rgw_http_param_pair
|
||||
}
|
||||
|
||||
RGWRESTStreamS3PutObj *wr = new RGWRESTStreamS3PutObj(cct, "PUT", url, NULL, ¶ms, api_name, host_style);
|
||||
// coverity[uninit_use_in_call:SUPPRESS]
|
||||
wr->send_init(obj);
|
||||
*req = wr;
|
||||
return 0;
|
||||
@ -160,6 +162,7 @@ int RGWRESTConn::put_obj_async_init(const DoutPrefixProvider *dpp, const rgw_use
|
||||
param_vec_t params;
|
||||
populate_params(params, &uid, self_zone_group);
|
||||
RGWRESTStreamS3PutObj *wr = new RGWRESTStreamS3PutObj(cct, "PUT", url, NULL, ¶ms, api_name, host_style);
|
||||
// coverity[uninit_use_in_call:SUPPRESS]
|
||||
wr->put_obj_init(dpp, key, obj, attrs);
|
||||
*req = wr;
|
||||
return 0;
|
||||
@ -290,6 +293,7 @@ int RGWRESTConn::get_obj(const DoutPrefixProvider *dpp, const rgw_obj& obj, cons
|
||||
set_header(buf, extra_headers, "RANGE");
|
||||
}
|
||||
|
||||
// coverity[uninit_use_in_call:SUPPRESS]
|
||||
int r = (*req)->send_prepare(dpp, key, extra_headers, obj);
|
||||
if (r < 0) {
|
||||
goto done_err;
|
||||
|
Loading…
Reference in New Issue
Block a user