diff options
author | Harald Welte <laforge@osmocom.org> | 2023-03-28 15:28:13 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2023-03-29 14:02:50 +0200 |
commit | f06b959c7de1129fba0081f88c4fb9707ffc31df (patch) | |
tree | e3883523e991df3ec8141c6cee0d1f7292728336 | |
parent | 2551882c1cc4de0b4168e4c25f4f6bc0ad8cdbd5 (diff) |
lc15: fix compiler warning about unused variable cell_size
oml.c: In function ‘bts_model_apply_oml’:
oml.c:1814:17: error: variable ‘cell_size’ set but not used [-Werror=unused-but-set-variable]
1814 | uint8_t cell_size;
| ^~~~~~~~~
Change-Id: I0bf1542f613f613d03609d50836137ff440401af
-rw-r--r-- | src/osmo-bts-lc15/oml.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c index 4847c172..3709d8c4 100644 --- a/src/osmo-bts-lc15/oml.c +++ b/src/osmo-bts-lc15/oml.c @@ -1844,7 +1844,6 @@ int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, int rc; struct gsm_bts_trx *trx; struct lc15l1_hdl *fl1h; - uint8_t cell_size; /* TODO: NM Object without FSM: */ switch (foh->obj_class) { @@ -1858,10 +1857,11 @@ int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, case NM_MT_SET_RADIO_ATTR: trx = obj; fl1h = trx_lc15l1_hdl(trx); - /* convert max TA to max cell size in qbits */ - cell_size = bts->max_ta << 2; #if LITECELL15_API_VERSION >= LITECELL15_API(2,1,7) + { + /* convert max TA to max cell size in qbits */ + uint8_t cell_size = bts->max_ta << 2; /* We do not need to check for L1 handle * because the max cell size parameter can receive before MphInit */ if (fl1h->phy_inst->u.lc15.max_cell_size != cell_size) { @@ -1870,6 +1870,7 @@ int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg, /* update current max cell size */ fl1h->phy_inst->u.lc15.max_cell_size = cell_size; } + } #endif /* Did we go through MphInit yet? If yes fire and forget */ |