From 4fa2f6fdb29b2173c94fc3c9e4485e83817bffa8 Mon Sep 17 00:00:00 2001 From: Benjamin Gwin Date: Wed, 5 Oct 2022 13:56:25 -0700 Subject: [PATCH] ztress: Fix comparison of signed/unsigned types This fixes the compiler warning "comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare]" Signed-off-by: Benjamin Gwin --- subsys/testsuite/ztest/include/zephyr/ztress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/testsuite/ztest/include/zephyr/ztress.h b/subsys/testsuite/ztest/include/zephyr/ztress.h index 73616df7018..666f546e7e4 100644 --- a/subsys/testsuite/ztest/include/zephyr/ztress.h +++ b/subsys/testsuite/ztest/include/zephyr/ztress.h @@ -164,7 +164,7 @@ struct ztress_context_data { }; \ size_t cnt = ARRAY_SIZE(data1) - has_timer; \ static struct ztress_context_data data[ARRAY_SIZE(data1)]; \ - for (int i = 0; i < ARRAY_SIZE(data1); i++) { \ + for (size_t i = 0; i < ARRAY_SIZE(data1); i++) { \ data[i] = data1[i]; \ } \ int err = ztress_execute(has_timer ? &data[0] : NULL, &data[has_timer], cnt); \