summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-06-23 01:53:43 +0200
committerlynxis lazus <lynxis@fe80.eu>2019-07-08 13:23:45 +0000
commit4e284b637943980a405a8c44f2712b749ded428f (patch)
tree2658472dcbe3646f451623fca8c928e004ae0546 /src
parent316d1e1b7bbe4c6d1c9b6adbd27ecba3b20f3743 (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 'src')
-rw-r--r--src/gsm/gsm0808_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index afff59aa..364a04fe 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -273,7 +273,7 @@ static uint8_t enc_speech_codec(struct msgb *msg,
case GSM0808_SCT_FR5:
case GSM0808_SCT_HR4:
case GSM0808_SCT_CSD:
- OSMO_ASSERT((sc->cfg & 0xff00) == 0)
+ OSMO_ASSERT((sc->cfg & 0xff00) == 0);
msgb_put_u8(msg, (uint8_t) sc->cfg & 0xff);
break;
default:
@@ -874,7 +874,7 @@ uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg,
msgb_put_u8(msg, cil->id_discr & 0x0f);
- OSMO_ASSERT(cil->id_list_len <= GSM0808_CELL_ID_LIST2_MAXLEN)
+ OSMO_ASSERT(cil->id_list_len <= GSM0808_CELL_ID_LIST2_MAXLEN);
for (i = 0; i < cil->id_list_len; i++)
gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, &cil->id_list[i]);
@@ -906,7 +906,7 @@ uint8_t gsm0808_enc_cell_id_list(struct msgb *msg,
switch (cil->id_discr) {
case CELL_IDENT_LAC:
- OSMO_ASSERT(cil->id_list_len <= CELL_ID_LIST_LAC_MAXLEN)
+ OSMO_ASSERT(cil->id_list_len <= CELL_ID_LIST_LAC_MAXLEN);
for (i=0;i<cil->id_list_len;i++) {
msgb_put_u16(msg, cil->id_list_lac[i]);
}