From 733a65704f8bbfd45b504cfc4afb7efca6f0f0df Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 2 Oct 2023 16:42:28 +0000 Subject: [PATCH] osd: correct unsigned/signed compiler wrn MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /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 --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5