diff mbox series

[liburing,v1,09/10] test/eventfd-disable: Fix reading uninitialized variable

Message ID 20220810002735.2260172-10-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series liburing test fixes | expand

Commit Message

Ammar Faizi Aug. 10, 2022, 12:31 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

Fix this:

  ==2256099== Conditional jump or move depends on uninitialised value(s)
  ==2256099==    at 0x109DF5: main (eventfd-disable.c:136)

Link: https://github.com/axboe/liburing/issues/640
Reported-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 test/eventfd-disable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/eventfd-disable.c b/test/eventfd-disable.c
index 2c8cf6d..9de2465 100644
--- a/test/eventfd-disable.c
+++ b/test/eventfd-disable.c
@@ -21,7 +21,7 @@  int main(int argc, char *argv[])
 	struct io_uring_sqe *sqe;
 	struct io_uring_cqe *cqe;
 	struct io_uring ring;
-	uint64_t ptr;
+	uint64_t ptr = 0;
 	struct iovec vec = {
 		.iov_base = &ptr,
 		.iov_len = sizeof(ptr)