diff --git a/test/list_test.c b/test/list_test.c index 67af033..3c08fd9 100644 --- a/test/list_test.c +++ b/test/list_test.c @@ -1089,10 +1089,14 @@ static MunitResult test_reduce2(const MunitParameter params[], void* fixture) *c = true; *d = true; - bool res; + cc_list_add(list, a); + cc_list_add(list, b); + cc_list_add(list, c); + cc_list_add(list, d); - cc_list_reduce(list, bool_and, &res); + bool res = false; + cc_list_reduce(list, bool_and, &res); munit_assert_true(res); cc_list_destroy(list);