]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix uninitialized warnings
authorDaniel Gryniewicz <dang@redhat.com>
Tue, 10 Aug 2021 16:22:58 +0000 (12:22 -0400)
committerDaniel Gryniewicz <dang@redhat.com>
Wed, 18 Aug 2021 14:44:15 +0000 (10:44 -0400)
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
src/rgw/rgw_bucket_sync.cc
src/rgw/rgw_rados.cc

index d4b937a4713b18bd26f06a0432e1e8a09a8c2304..045d6bdf4b5b616bb61b1c6b4c5333f159c4097c 100644 (file)
@@ -355,7 +355,7 @@ bool RGWBucketSyncFlowManager::pipe_rules::find_basic_info_without_tags(const rg
   std::optional<rgw_user> _user;
   std::optional<rgw_sync_pipe_acl_translation> _acl_translation;
   std::optional<string> _storage_class;
-  rgw_sync_pipe_params::Mode _mode;
+  rgw_sync_pipe_params::Mode _mode{rgw_sync_pipe_params::Mode::MODE_SYSTEM};
 
   int i = 0;
   for (auto& iter : iters) {
index 651bb74840e9e1671538278e638957bae1bccfde..a608d608ad8753d0f47c17e1ac8b0bdfe3cffd0f 100644 (file)
@@ -5106,7 +5106,7 @@ int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvi
       result.version_id = instance;
     }
 
-    BucketShard *bs;
+    BucketShard *bs = nullptr;
     int r = target->get_bucket_shard(&bs, dpp);
     if (r < 0) {
       ldpp_dout(dpp, 5) << "failed to get BucketShard object: r=" << r << dendl;
@@ -6069,7 +6069,7 @@ int RGWRados::Object::Read::range_to_ofs(uint64_t obj_size, int64_t &ofs, int64_
 int RGWRados::Bucket::UpdateIndex::guard_reshard(const DoutPrefixProvider *dpp, BucketShard **pbs, std::function<int(BucketShard *)> call)
 {
   RGWRados *store = target->get_store();
-  BucketShard *bs;
+  BucketShard *bs = nullptr;
   int r;
 
 #define NUM_RESHARD_RETRIES 10
@@ -6203,7 +6203,7 @@ int RGWRados::Bucket::UpdateIndex::complete_del(const DoutPrefixProvider *dpp,
     return 0;
   }
   RGWRados *store = target->get_store();
-  BucketShard *bs;
+  BucketShard *bs = nullptr;
 
   int ret = get_bucket_shard(&bs, dpp);
   if (ret < 0) {