From: Patrick Donnelly Date: Mon, 2 Oct 2023 16:42:28 +0000 (+0000) Subject: osd: correct unsigned/signed compiler wrn X-Git-Tag: v19.0.0~358^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=733a65704f8bbfd45b504cfc4afb7efca6f0f0df;p=ceph-ci.git osd: correct unsigned/signed compiler wrn /home/pdonnell/ceph/src/osd/OSD.cc: In member function ‘void OSD::ShardedOpWQ::stop_for_fast_shutdown()’: /home/pdonnell/ceph/src/osd/OSD.cc:11143:41: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 11143 | for (int shard_index = 0; shard_index < osd->num_shards; shard_index++) { Fixes: https://tracker.ceph.com/issues/62851 Fixes: 210dbd4ff19ea66fd2f0109cc15aad53349be52f Signed-off-by: Patrick Donnelly --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d6948cf05a7..f01540c3a93 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -11140,7 +11140,7 @@ void OSD::ShardedOpWQ::stop_for_fast_shutdown() { m_fast_shutdown = true; - for (int shard_index = 0; shard_index < osd->num_shards; shard_index++) { + for (uint64_t shard_index = 0; shard_index < osd->num_shards; shard_index++) { auto& sdata = osd->shards[shard_index]; ceph_assert(sdata); std::lock_guard l(sdata->shard_lock);