From 53bac4648ed53d25eb66b7755d5ca34139956e64 Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Tue, 11 Mar 2025 09:56:07 +0000 Subject: [PATCH] common: Remove unnecessary assert checking unsigned number is 0 or greater. Minor compiler warning caused by unsigned comparison with zero. Clearly assert is not necessary and so was removed. Wrapping scenarios are policed using remaining assert code. Signed-off-by: Alex Ainscow --- src/common/bitset_set.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bitset_set.h b/src/common/bitset_set.h index 0b19b0041e01d..ac1dec5c1834c 100644 --- a/src/common/bitset_set.h +++ b/src/common/bitset_set.h @@ -220,7 +220,7 @@ class bitset_set { // This is not an off-by-one error. Conventionally this would have length // - 1, but the logic below is simpler with it as follows. unsigned end_word = (int(start) + length) / bits_per_uint64_t; - ceph_assert(0 <= end_word && end_word < word_count + 1); + ceph_assert(end_word < word_count + 1); if (start_word == end_word) { words[start_word] &= -- 2.39.5