From 4e284b637943980a405a8c44f2712b749ded428f Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 23 Jun 2019 01:53:43 +0200 Subject: utils.h: require a semi colon after OSMO_ASSERT When using `OSMO_ASSERT(exp);` clang will warn about an empty expression because the semi colon was superflous. Use do {} while (0) to enfore the need of a semi colon. This might break other test. Change-Id: I2272d29a81496164bebd1696a694383a28a86434 --- tests/ctrl/ctrl_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index cffb8039..b46e9ac5 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -121,7 +121,7 @@ static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, printf("replied: '%s'\n", osmo_escape_str((char*)msgb_l2(sent_msg), -1)); OSMO_ASSERT(t->reply_str); - OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg))) + OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg))); msgb_free(sent_msg); } osmo_wqueue_clear(&ccon->write_queue); -- cgit v1.2.3