diff options
author | David Robillard <d@drobilla.net> | 2020-06-21 17:38:13 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:06:27 +0200 |
commit | dfe59abeecba302a04a2d38a78a40fe356ec81a7 (patch) | |
tree | 72a907aafc0200890a9db2ac3d97e0e15f74478a /tests | |
parent | f3e2c83e894ebc5ca42e7260215ef5d31e95ded6 (diff) | |
download | serd-dfe59abeecba302a04a2d38a78a40fe356ec81a7.tar.gz serd-dfe59abeecba302a04a2d38a78a40fe356ec81a7.tar.bz2 serd-dfe59abeecba302a04a2d38a78a40fe356ec81a7.zip |
Cleanup: Fix uninitialised variables
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index 95e5505e..5e67eca1 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -254,7 +254,7 @@ test_blob_to_node(void) assert(blob.n_bytes == blob.n_chars); assert(blob.n_bytes == strlen((const char*)blob.buf)); - size_t out_size; + size_t out_size = 0; uint8_t* out = (uint8_t*)serd_base64_decode( blob.buf, blob.n_bytes, &out_size); assert(out_size == size); @@ -274,9 +274,9 @@ test_strlen(void) { const uint8_t str[] = { '"', '5', 0xE2, 0x82, 0xAC, '"', '\n', 0 }; - size_t n_bytes; - SerdNodeFlags flags; - size_t len = serd_strlen(str, &n_bytes, &flags); + size_t n_bytes = 0; + SerdNodeFlags flags = 0; + size_t len = serd_strlen(str, &n_bytes, &flags); assert(len == 5 && n_bytes == 7 && flags == (SERD_HAS_QUOTE | SERD_HAS_NEWLINE)); len = serd_strlen(str, NULL, &flags); |