]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: zero-init shard_count in RGWBucket::check_index_unlinked() 59117/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 9 Aug 2024 19:41:35 +0000 (15:41 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 9 Aug 2024 19:41:37 +0000 (15:41 -0400)
rgw_bucket.cc:962:19: warning: â€˜shard_count’ may be used uninitialized [-Wmaybe-uninitialized]

Fixes: https://tracker.ceph.com/issues/67468
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_bucket.cc

index 996de5f3c4d85ddecc4de1415a4ceea2657a964b..4a522cb7571d400b69a2513e82dcd72819f89b8e 100644 (file)
@@ -953,7 +953,7 @@ int RGWBucket::check_index_unlinked(rgw::sal::RadosStore* const rados_store,
         if (shard >= max_shards) {
           return;
         }
-        uint64_t shard_count;
+        uint64_t shard_count = 0;
         int r = ::check_index_unlinked(rados_store, &*bucket, dpp, op_state, flusher, shard, &shard_count, yield);
         if (r < 0) {
           ldpp_dout(dpp, -1) << "ERROR: error processing shard " << shard <<