pespin has submitted this change. (
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(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
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;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/27851
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ifebaee63a9dad04976ffb4438c32360687ef095a
Gerrit-Change-Number: 27851
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged