From ad42412e3353893ccb365cf357a286b0afe545ba Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 31 Dec 2020 15:48:28 +0100 Subject: Initialize all variables --- test/ring_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ring_test.c') diff --git a/test/ring_test.c b/test/ring_test.c index 915d099..1a26cd3 100644 --- a/test/ring_test.c +++ b/test/ring_test.c @@ -144,12 +144,12 @@ main(int argc, char** argv) zix_ring_mlock(ring); - ZixThread reader_thread; + ZixThread reader_thread; // NOLINT if (zix_thread_create(&reader_thread, MSG_SIZE * 4, reader, NULL)) { return failure("Failed to create reader thread\n"); } - ZixThread writer_thread; + ZixThread writer_thread; // NOLINT if (zix_thread_create(&writer_thread, MSG_SIZE * 4, writer, NULL)) { return failure("Failed to create writer thread\n"); } @@ -172,8 +172,8 @@ main(int argc, char** argv) zix_ring_write(ring, "a", 1); zix_ring_write(ring, "b", 1); - char buf; - uint32_t n = zix_ring_peek(ring, &buf, 1); + char buf = 0; + uint32_t n = zix_ring_peek(ring, &buf, 1); if (n != 1) { return failure("Peek n (%u) != 1\n", n); } -- cgit v1.2.1