# HG changeset patch # User Mike Becker # Date 1759181519 -7200 # Node ID 0f6515875a092444d30c2043a37eeb1b6eb14983 # Parent ae80e36c05c71831172b69fc00eabb60baa253c4 fix using empty initializer, which is a C23 extension diff -r ae80e36c05c7 -r 0f6515875a09 src/kv_list.c --- 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; diff -r ae80e36c05c7 -r 0f6515875a09 tests/test_kv_list.c --- 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));