DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test: fix macro by adding in missing "do" in do-while
@ 2014-12-17 17:06 Bruce Richardson
  2014-12-17 23:45 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2014-12-17 17:06 UTC (permalink / raw)
  To: 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 <bruce.richardson@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] test: fix macro by adding in missing "do" in do-while
  2014-12-17 17:06 [dpdk-dev] [PATCH] test: fix macro by adding in missing "do" in do-while Bruce Richardson
@ 2014-12-17 23:45 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-12-17 23:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-12-17 17:06, Bruce Richardson:
> 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 <bruce.richardson@intel.com>

Applied

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-17 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 17:06 [dpdk-dev] [PATCH] test: fix macro by adding in missing "do" in do-while Bruce Richardson
2014-12-17 23:45 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).