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
This commit is contained in:
Pau Espin 2022-04-20 16:09:29 +02:00
parent 8b83a4a70f
commit 0f3d7ea35b
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
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;