aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-10 11:59:53 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-10 11:59:53 +0100
commit8332e29c9f3f97cbe22f83673cac4e68c57959f1 (patch)
tree7884b3c87d4697652c766a98518881ac1d04b8d2
parentbe63f03254c036a8466c434b6391ad1a2c2a18bc (diff)
tch: Avoid compiler warnings when using the direct RTP mode
tch.c: In function 'l1_to_rtppayload_amr': tch.c:247:29: warning: unused variable 'amr_mrc' [-Wunused-variable] struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr; ^ tch.c: In function 'rtppayload_to_l1_amr': tch.c:335:10: warning: unused variable 'amr_if2_core_len' [-Wunused-variable] uint8_t amr_if2_core_len = payload_len - 2;
-rw-r--r--src/osmo-bts-sysmo/tch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c
index d101b47a..422df0f7 100644
--- a/src/osmo-bts-sysmo/tch.c
+++ b/src/osmo-bts-sysmo/tch.c
@@ -244,7 +244,9 @@ static int rtppayload_to_l1_hr(uint8_t *l1_payload, const uint8_t *rtp_payload,
static struct msgb *l1_to_rtppayload_amr(uint8_t *l1_payload, uint8_t payload_len,
struct gsm_lchan *lchan)
{
+#ifndef USE_L1_RTP_MODE
struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr;
+#endif
struct msgb *msg;
uint8_t amr_if2_len = payload_len - 2;
uint8_t *cur;
@@ -332,12 +334,13 @@ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload,
uint8_t cmi, sti;
uint8_t *l1_cmi_idx = l1_payload;
uint8_t *l1_cmr_idx = l1_payload+1;
- uint8_t amr_if2_core_len = payload_len - 2;
int rc;
#ifdef USE_L1_RTP_MODE
memcpy(l1_payload+2, rtp_payload, payload_len);
#else
+ uint8_t amr_if2_core_len = payload_len - 2;
+
/* step1: shift everything right one nibble; make space for FT */
osmo_nibble_shift_right(l1_payload+2, rtp_payload+2, amr_if2_core_len*2);
/* step2: reverse the bit-order within every byte of the IF2