pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/27851 )
Change subject: bts-trx: sched_lchan_tchh.c: Workaround gcc false positive error ......................................................................
bts-trx: sched_lchan_tchh.c: Workaround gcc false positive error
Manual analysis of code didn't end up in finding any issue, so this seems a false positive (I can really understand gcc failing to do proper job here, this function has way to many jumps here and there.
""" /sched_lchan_tchh.c:88:13: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 88 | int rc, amr = 0; | ^~ """
Change-Id: Ifebaee63a9dad04976ffb4438c32360687ef095a --- M src/osmo-bts-trx/sched_lchan_tchh.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/51/27851/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 1b4aa40..2281fb7 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -85,7 +85,8 @@ uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; uint8_t tch_data[128]; /* just to be safe */ - int rc, amr = 0; + int rc = 0; /* initialize to make gcc happy */ + int amr = 0; int n_errors = 0; int n_bits_total = 0; bool bfi_flag = false;