From 5629afa3644799b0aa1751b9504ecc2d0233b445 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sun, 1 Mar 2015 15:45:14 +0000 Subject: [PATCH] test_preventallow_*.c: Silence clang empty body warning Clang whinges about an empty loop body when it sees code like while (i = 0; i++; i < 2); but in test_preventallow_*.c this looks intentional, so move the semi-colon to a line of its own to make clang happy. Signed-off-by: Sitsofe Wheeler --- test-tool/test_preventallow_cold_reset.c | 3 ++- test-tool/test_preventallow_lun_reset.c | 3 ++- test-tool/test_preventallow_warm_reset.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test-tool/test_preventallow_cold_reset.c b/test-tool/test_preventallow_cold_reset.c index a604b2e..3f8da1e 100644 --- a/test-tool/test_preventallow_cold_reset.c +++ b/test-tool/test_preventallow_cold_reset.c @@ -61,7 +61,8 @@ test_preventallow_cold_reset(void) logging(LOG_VERBOSE, "Perform cold reset on target"); ret = iscsi_task_mgmt_target_cold_reset_sync(sd->iscsi_ctx); logging(LOG_VERBOSE, "Wait until all unit attentions clear"); - while (testunitready(sd, EXPECT_STATUS_GOOD) != 0); + while (testunitready(sd, EXPECT_STATUS_GOOD) != 0) + ; CU_ASSERT_EQUAL(ret, 0); diff --git a/test-tool/test_preventallow_lun_reset.c b/test-tool/test_preventallow_lun_reset.c index f7c0502..ae5c3db 100644 --- a/test-tool/test_preventallow_lun_reset.c +++ b/test-tool/test_preventallow_lun_reset.c @@ -62,7 +62,8 @@ test_preventallow_lun_reset(void) ret = iscsi_task_mgmt_lun_reset_sync(sd->iscsi_ctx, sd->iscsi_lun); CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Wait until all unit attentions clear"); - while (testunitready(sd, EXPECT_STATUS_GOOD) != 0); + while (testunitready(sd, EXPECT_STATUS_GOOD) != 0) + ; logging(LOG_VERBOSE, "Try to eject the medium"); diff --git a/test-tool/test_preventallow_warm_reset.c b/test-tool/test_preventallow_warm_reset.c index 42604d1..cb0970a 100644 --- a/test-tool/test_preventallow_warm_reset.c +++ b/test-tool/test_preventallow_warm_reset.c @@ -62,7 +62,8 @@ test_preventallow_warm_reset(void) ret = iscsi_task_mgmt_target_warm_reset_sync(sd->iscsi_ctx); CU_ASSERT_EQUAL(ret, 0); logging(LOG_VERBOSE, "Wait until all unit attentions clear"); - while (testunitready(sd, EXPECT_STATUS_GOOD) != 0); + while (testunitready(sd, EXPECT_STATUS_GOOD) != 0) + ; logging(LOG_VERBOSE, "Try to eject the medium");