diff options
author | David Robillard <d@drobilla.net> | 2020-12-31 15:48:28 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-31 18:13:35 +0100 |
commit | ad42412e3353893ccb365cf357a286b0afe545ba (patch) | |
tree | a5b1951eeb2d8a396e5d3d33dbf9cee8d326d6b9 /test/sorted_array_test.c | |
parent | a4a67d67cbbed4e027a4587c9956adbd404d097d (diff) | |
download | zix-ad42412e3353893ccb365cf357a286b0afe545ba.tar.gz zix-ad42412e3353893ccb365cf357a286b0afe545ba.tar.bz2 zix-ad42412e3353893ccb365cf357a286b0afe545ba.zip |
Initialize all variables
Diffstat (limited to 'test/sorted_array_test.c')
-rw-r--r-- | test/sorted_array_test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/sorted_array_test.c b/test/sorted_array_test.c index d991784..a782db4 100644 --- a/test/sorted_array_test.c +++ b/test/sorted_array_test.c @@ -58,8 +58,8 @@ test_fail(void) static int stress(unsigned test_num, unsigned n_elems) { - intptr_t r; - ZixSortedArrayIter ti; + intptr_t r = 0; + ZixSortedArrayIter ti = NULL; ZixSortedArray* t = zix_sorted_array_new(true, int_cmp, NULL, sizeof(intptr_t)); @@ -126,7 +126,8 @@ stress(unsigned test_num, unsigned n_elems) // Delete all elements for (unsigned e = 0; e < n_elems; e++) { r = ith_elem(test_num, n_elems, e); - ZixSortedArrayIter item; + + ZixSortedArrayIter item = NULL; if (zix_sorted_array_find(t, &r, &item) != ZIX_STATUS_SUCCESS) { fprintf(stderr, "Failed to find item to remove\n"); return test_fail(); |