From: Danny Al-Gaaf Date: Mon, 14 May 2018 21:50:39 +0000 (+0200) Subject: rgw: use static_cast<>() instead of C-style casts X-Git-Tag: v14.0.1~984^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f5f7b8a8503c17bea125e03466845994078c1446;p=ceph.git rgw: use static_cast<>() instead of C-style casts Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index fecfbb4c679c..89f7b33d2058 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -430,7 +430,7 @@ bool RGWCoroutinesStack::collect(int *ret, RGWCoroutinesStack *skip_stack) /* re static void _aio_completion_notifier_cb(librados::completion_t cb, void *arg) { - ((RGWAioCompletionNotifier *)arg)->cb(); + (static_cast(arg))->cb(); } RGWAioCompletionNotifier::RGWAioCompletionNotifier(RGWCompletionManager *_mgr, const rgw_io_id& _io_id, void *_user_data) : completion_mgr(_mgr), @@ -531,7 +531,7 @@ void RGWCoroutinesManager::handle_unblocked_stack(set& con RGWCompletionManager::io_completion& io, int *blocked_count) { assert(lock.is_wlocked()); - RGWCoroutinesStack *stack = (RGWCoroutinesStack *)io.user_info; + RGWCoroutinesStack *stack = static_cast(io.user_info); if (context_stacks.find(stack) == context_stacks.end()) { return; } diff --git a/src/rgw/rgw_sync_module_aws.cc b/src/rgw/rgw_sync_module_aws.cc index 9dac4cbb470f..42008a74fc6a 100644 --- a/src/rgw/rgw_sync_module_aws.cc +++ b/src/rgw/rgw_sync_module_aws.cc @@ -949,7 +949,7 @@ public: } void send_ready(const rgw_rest_obj& rest_obj) override { - RGWRESTStreamS3PutObj *r = (RGWRESTStreamS3PutObj *)req; + RGWRESTStreamS3PutObj *r = static_cast(req); map new_attrs; if (!multipart.is_multipart) { @@ -1088,7 +1088,7 @@ public: return set_cr_error(retcode); } - if (!((RGWAWSStreamPutCRF *)out_crf.get())->get_etag(petag)) { + if (!(static_cast(out_crf.get()))->get_etag(petag)) { ldout(sync_env->cct, 0) << "ERROR: failed to get etag from PUT request" << dendl; return set_cr_error(-EIO); }