summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-13 11:58:23 -0500
committerDavid Robillard <d@drobilla.net>2024-11-13 11:59:48 -0500
commit7f760acfdfa228f090332230f119072fb95c1aa4 (patch)
tree84f9e52440543478b54a51f4c47b5badcb94d47f /test
parent35e76431e5bdf24b67dc0b9a3f78367adb36b15c (diff)
downloadsord-7f760acfdfa228f090332230f119072fb95c1aa4.tar.gz
sord-7f760acfdfa228f090332230f119072fb95c1aa4.tar.bz2
sord-7f760acfdfa228f090332230f119072fb95c1aa4.zip
Initialize all variables
Diffstat (limited to 'test')
-rw-r--r--test/test_sord.c10
1 files changed, 5 insertions, 5 deletions
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));