From: Alex Ainscow Date: Tue, 11 Mar 2025 09:56:07 +0000 (+0000) Subject: common: Remove unnecessary assert checking unsigned number is 0 or greater. X-Git-Tag: v20.3.0~389^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=53bac4648ed53d25eb66b7755d5ca34139956e64;p=ceph.git 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 --- 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] &=