From: Bruce Richardson Date: Wed, 17 Dec 2014 17:06:53 +0000 (+0000) Subject: app/test: fix assert macro X-Git-Tag: spdx-start~9905 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e1e0d0bc1b78abaf9e6eeac4f11c0515e2576270;p=dpdk.git 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 --- 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__); \