From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: [PATCH] test: fix macro by adding in missing "do" in do-while Date: Wed, 17 Dec 2014 17:06:53 +0000 Message-ID: <1418836013-19030-1-git-send-email-bruce.richardson@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" One of the test assertion macros was missing the "do" part of the do-while. This issue was picked up by clang reporting an empty while loop body for the closing while of the do-while pair. Signed-off-by: Bruce Richardson --- app/test/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test.h b/app/test/test.h index 72e67b9..896f7db 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -44,7 +44,7 @@ } \ } while (0) -#define TEST_ASSERT_EQUAL(a, b, msg, ...) { \ +#define TEST_ASSERT_EQUAL(a, b, msg, ...) do { \ if (!(a == b)) { \ printf("TestCase %s() line %d failed: " \ msg "\n", __func__, __LINE__, ##__VA_ARGS__); \ -- 2.1.0