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 <alex.fabre@rtone.fr>
This commit is contained in:
Alex Fabre 2025-05-09 09:40:24 +02:00 committed by Benjamin Cabé
commit da2ecd3eb8

View file

@ -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;