From da2ecd3eb877b0cbda2830ebcf799073d18e8623 Mon Sep 17 00:00:00 2001 From: Alex Fabre Date: Fri, 9 May 2025 09:40:24 +0200 Subject: [PATCH] utils: bitarray: fix comparison of int of different signs Clang 20.1.0 -Wsign-compare warning on int being compared with size_t (unsigned int). Signed-off-by: Alex Fabre --- lib/utils/bitarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/bitarray.c b/lib/utils/bitarray.c index dfd7e6b9453..07f22e0c94b 100644 --- a/lib/utils/bitarray.c +++ b/lib/utils/bitarray.c @@ -620,7 +620,7 @@ found: /* The bit we are looking for must be in the current bundle idx. * Find out the exact index of the bit. */ - for (int j = 0; j <= bundle_bitness(bitarray) - 1; j++) { + for (size_t j = 0; j <= bundle_bitness(bitarray) - 1; j++) { if (bitarray->bundles[idx] & mask & BIT(j)) { if (--n <= 0) { *found_at = idx * bundle_bitness(bitarray) + j;