]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use static_cast<>() instead of C-style casts
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 14 May 2018 21:50:39 +0000 (23:50 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Jun 2018 21:14:15 +0000 (23:14 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_coroutine.cc
src/rgw/rgw_sync_module_aws.cc

index fecfbb4c679cda4c0dbd2c5bf3a01ae99c9087f4..89f7b33d20580c1ac1f787cf5e52587290995c51 100644 (file)
@@ -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<RGWAioCompletionNotifier *>(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<RGWCoroutinesStack *>& con
                                                   RGWCompletionManager::io_completion& io, int *blocked_count)
 {
   assert(lock.is_wlocked());
-  RGWCoroutinesStack *stack = (RGWCoroutinesStack *)io.user_info;
+  RGWCoroutinesStack *stack = static_cast<RGWCoroutinesStack *>(io.user_info);
   if (context_stacks.find(stack) == context_stacks.end()) {
     return;
   }
index 9dac4cbb470ffa9a5ae9b9f15e8cfe950ecbc6fd..42008a74fc6a0763d7e9aa2073be92e8d1500d06 100644 (file)
@@ -949,7 +949,7 @@ public:
   }
 
   void send_ready(const rgw_rest_obj& rest_obj) override {
-    RGWRESTStreamS3PutObj *r = (RGWRESTStreamS3PutObj *)req;
+    RGWRESTStreamS3PutObj *r = static_cast<RGWRESTStreamS3PutObj *>(req);
 
     map<string, string> 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<RGWAWSStreamPutCRF *>(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);
       }