Mon, 29 Sep 2025 23:31:59 +0200
fix using empty initializer, which is a C23 extension
src/kv_list.c | file | annotate | diff | comparison | revisions | |
tests/test_kv_list.c | file | annotate | diff | comparison | revisions |
--- a/src/kv_list.c Mon Sep 29 23:28:46 2025 +0200 +++ b/src/kv_list.c Mon Sep 29 23:31:59 2025 +0200 @@ -446,7 +446,7 @@ } CxMapIterator cx_kvl_map_iterator(const CxMap *map, enum cx_map_iterator_type type) { - CxMapIterator iter = {}; + CxMapIterator iter = {0}; iter.type = type; iter.map.c = map;
--- a/tests/test_kv_list.c Mon Sep 29 23:28:46 2025 +0200 +++ b/tests/test_kv_list.c Mon Sep 29 23:31:59 2025 +0200 @@ -325,7 +325,7 @@ CxMap *map = cxKvListAsMap(list); x = 13; // test with a custom key that was not hashed, yet - CxHashKey key = {}; + CxHashKey key = {0}; key.data = "xyz"; key.len = 3; CX_TEST_ASSERT(0 == cxMapPut(map, key, &x)); @@ -424,7 +424,7 @@ // now check with a non-prehashed key x = 85; cxListAdd(list, &x); - CxHashKey key = {}; + CxHashKey key = {0}; key.data = "abc"; key.len = 3; CX_TEST_ASSERT(0 == cxKvListSetKey(list, 0, key));