Skip to content

Commit da2ecd3

Browse files
AlexFabrekartben
authored andcommitted
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>
1 parent c8a37d0 commit da2ecd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/bitarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ int sys_bitarray_find_nth_set(sys_bitarray_t *bitarray, size_t n, size_t num_bit
620620
/* The bit we are looking for must be in the current bundle idx.
621621
* Find out the exact index of the bit.
622622
*/
623-
for (int j = 0; j <= bundle_bitness(bitarray) - 1; j++) {
623+
for (size_t j = 0; j <= bundle_bitness(bitarray) - 1; j++) {
624624
if (bitarray->bundles[idx] & mask & BIT(j)) {
625625
if (--n <= 0) {
626626
*found_at = idx * bundle_bitness(bitarray) + j;

0 commit comments

Comments
 (0)