fix comparing size_t with int

Tue, 29 Oct 2024 18:47:49 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 29 Oct 2024 18:47:49 +0100
changeset 956
abd60ccd74f7
parent 955
18741059da47
child 957
26e47a874f19

fix comparing size_t with int

tests/test_printf.c file | annotate | diff | comparison | revisions
--- a/tests/test_printf.c	Tue Oct 29 18:46:50 2024 +0100
+++ b/tests/test_printf.c	Tue Oct 29 18:47:49 2024 +0100
@@ -181,7 +181,7 @@
 
     cxmutstr r[13];
     size_t specimen_count = cx_nmemb(r);
-    int specimen = 0;
+    size_t specimen = 0;
 
     CX_TEST_DO {
         r[specimen] = cx_asprintf_a(alloc, "teststring");
@@ -264,7 +264,7 @@
 
         CX_TEST_ASSERT(specimen == specimen_count); // self-test
 
-        for (int i = 0; i < specimen_count; i++) {
+        for (size_t i = 0; i < specimen_count; i++) {
             cx_strfree_a(alloc, &r[i]);
         }
         CX_TEST_ASSERT(cx_testing_allocator_verify(&talloc));

mercurial