From c49461e4b7e9d6f312beebf3e76e91d16b632e97 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 24 Jun 2021 20:07:54 -0700 Subject: [PATCH] test-tool: Do not use empty initializers Empty initializers are a GNU extension that is not supported by older versions of gcc. Fixes: https://github.com/sahlberg/libiscsi/issues/356 --- test-tool/test_async_write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test-tool/test_async_write.c b/test-tool/test_async_write.c index cf5efcd..f631641 100644 --- a/test-tool/test_async_write.c +++ b/test-tool/test_async_write.c @@ -67,7 +67,7 @@ void test_async_write(void) { int i, ret; - struct tests_async_write_state state = { }; + struct tests_async_write_state state; int blocks_per_io = 8; int num_ios = 1000; /* IOs in flight concurrently, but all using the same src buffer */ @@ -77,6 +77,7 @@ test_async_write(void) CHECK_FOR_SBC; CHECK_FOR_ISCSI(sd); + memset(&state, 0, sizeof(state)); if (maximum_transfer_length && (maximum_transfer_length < (blocks_per_io * num_ios))) { CU_PASS("[SKIPPED] device too small for async_write test"); @@ -144,7 +145,7 @@ void test_async_io_logout(void) { int i, ret; - struct tests_async_write_state state = { }; + struct tests_async_write_state state; int blocks_per_io = 8; int num_ios = 10; /* IOs in flight concurrently, but all using the same src buffer */ @@ -154,6 +155,7 @@ test_async_io_logout(void) CHECK_FOR_SBC; CHECK_FOR_ISCSI(sd); + memset(&state, 0, sizeof(state)); if (maximum_transfer_length && maximum_transfer_length < (blocks_per_io * num_ios)) { CU_PASS("[SKIPPED] device too small for async IO test");