aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-04-20 16:09:29 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-04-20 16:09:31 +0200
commit0f3d7ea35bff41b3452b60e3ee2516793954fa74 (patch)
treea7a25f3833267cfad43f9948c80049473e628e9f
parent8b83a4a70f6b2c1170d3895935031b02d4f1d7d2 (diff)
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
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 1b4aa40b..2281fb75 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -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;