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;
This commit is contained in:
Holger Hans Peter Freyther 2014-11-10 11:59:53 +01:00
parent be63f03254
commit 8332e29c9f
1 changed files with 4 additions and 1 deletions

View File

@ -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