From e1e0d0bc1b78abaf9e6eeac4f11c0515e2576270 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Wed, 17 Dec 2014 17:06:53 +0000 Subject: [PATCH] app/test: fix assert macro 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 72e67b9c37..896f7dbc15 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.20.1