Browse Source

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 <alex.fabre@rtone.fr>
pull/65659/merge
Alex Fabre 2 months ago committed by Benjamin Cabé
parent
commit
c8a37d009a
  1. 2
      kernel/include/priority_q.h

2
kernel/include/priority_q.h

@ -280,7 +280,7 @@ static ALWAYS_INLINE unsigned int z_priq_mq_best_queue_index(struct _priq_mq *pq @@ -280,7 +280,7 @@ static ALWAYS_INLINE unsigned int z_priq_mq_best_queue_index(struct _priq_mq *pq
static ALWAYS_INLINE void z_priq_mq_init(struct _priq_mq *q)
{
for (int i = 0; i < ARRAY_SIZE(q->queues); i++) {
for (size_t i = 0; i < ARRAY_SIZE(q->queues); i++) {
sys_dlist_init(&q->queues[i]);
}

Loading…
Cancel
Save