Skip to content

Commit c8a37d0

Browse files
AlexFabrekartben
authored andcommitted
kernel: priority_q: 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 <[email protected]>
1 parent 9dd9661 commit c8a37d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/include/priority_q.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static ALWAYS_INLINE unsigned int z_priq_mq_best_queue_index(struct _priq_mq *pq
280280

281281
static ALWAYS_INLINE void z_priq_mq_init(struct _priq_mq *q)
282282
{
283-
for (int i = 0; i < ARRAY_SIZE(q->queues); i++) {
283+
for (size_t i = 0; i < ARRAY_SIZE(q->queues); i++) {
284284
sys_dlist_init(&q->queues[i]);
285285
}
286286

0 commit comments

Comments
 (0)