From: SangYoun Kwak Date: Tue, 31 Dec 2024 07:46:02 +0000 (+0900) Subject: test: Modify index variable type of 'for'statement X-Git-Tag: accepted/tizen/unified/20250102.161033^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_unified;p=platform%2Fcore%2Fapi%2Fperipheral-io.git 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 --- 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;