diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-06-23 01:53:43 +0200 |
---|---|---|
committer | lynxis lazus <lynxis@fe80.eu> | 2019-07-08 13:23:45 +0000 |
commit | 4e284b637943980a405a8c44f2712b749ded428f (patch) | |
tree | 2658472dcbe3646f451623fca8c928e004ae0546 /tests | |
parent | 316d1e1b7bbe4c6d1c9b6adbd27ecba3b20f3743 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ctrl/ctrl_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |