From c8a37d009a7f815b3eb4d44b24dc6a7d1d401840 Mon Sep 17 00:00:00 2001 From: Alex Fabre Date: Fri, 9 May 2025 09:39:05 +0200 Subject: [PATCH] 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 --- kernel/include/priority_q.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/include/priority_q.h b/kernel/include/priority_q.h index 09f86caa819..4b49ce3ee22 100644 --- a/kernel/include/priority_q.h +++ b/kernel/include/priority_q.h @@ -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]); }