From ec7c016af1b7ddc444a9b508d8ce846312c94c47 Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Tue, 31 Dec 2024 16:46:02 +0900 Subject: [PATCH] test: Modify index variable type of 'for'statement In the for statement, index variable is compared with 'n' and its type is size_t. Thus, to make this comparison properly, the type of index is modified as size_t. Change-Id: I01b7cc1ac533dd215a21bc954a589b582e45356d Signed-off-by: SangYoun Kwak --- test/peripheral-io-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/peripheral-io-test.c b/test/peripheral-io-test.c index f702930..2c72989 100644 --- a/test/peripheral-io-test.c +++ b/test/peripheral-io-test.c @@ -102,14 +102,14 @@ static int __get_feature(const char *key, bool *feature) static bool __skip_check(char *name) { size_t n = sizeof(skip_test_list) / sizeof(skip_test_list[0]); - for (unsigned int u = 0; u < n; ++u) - if (!strcmp(skip_test_list[u].model_name, model_name) && !strcmp(skip_test_list[u].test_name, name)) + for (size_t i = 0; i < n; ++i) + if (!strcmp(skip_test_list[i].model_name, model_name) && !strcmp(skip_test_list[i].test_name, name)) return true; if (i2c_no_stub_driver) { n = sizeof(skip_test_list_i2c_no_stub_driver) / sizeof(skip_test_list_i2c_no_stub_driver[0]); - for (unsigned int u = 0; u < n; u++) - if (!strcmp(skip_test_list_i2c_no_stub_driver[u], name)) + for (size_t i = 0; i < n; i++) + if (!strcmp(skip_test_list_i2c_no_stub_driver[i], name)) return true; } return false; -- 2.34.1