From 7f760acfdfa228f090332230f119072fb95c1aa4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 Nov 2024 11:58:23 -0500 Subject: Initialize all variables --- test/test_sord.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/test_sord.c b/test/test_sord.c index e9e634d..9c4b3c7 100644 --- a/test/test_sord.c +++ b/test/test_sord.c @@ -528,9 +528,9 @@ main(void) SordNode* chello = sord_new_literal(world, NULL, ni_hao, "cmn"); // Test literal length - size_t n_bytes; - size_t n_chars; - const uint8_t* str = sord_node_get_string_counted(lit_id2, &n_bytes); + size_t n_bytes = 0U; + size_t n_chars = 0U; + const uint8_t* str = sord_node_get_string_counted(lit_id2, &n_bytes); if (strcmp((const char*)str, "hello")) { return test_fail("Literal node corrupt\n"); } else if (n_bytes != strlen("hello")) { @@ -676,8 +676,8 @@ main(void) generate(world, sord, 1, graph43); // Remove one graph via iterator - SerdStatus st; - iter = sord_search(sord, NULL, NULL, NULL, graph43); + SerdStatus st = SERD_SUCCESS; + iter = sord_search(sord, NULL, NULL, NULL, graph43); while (!sord_iter_end(iter)) { if ((st = sord_erase(sord, iter))) { fprintf(stderr, "Remove by iterator failed (%s)\n", serd_strerror(st)); -- cgit v1.2.1