Merge pull request #415 from dragos-oancea/mod_amr-build-val-never-read

[mod_amr] scan-build: Value stored to 'ft' is never read - switch_amr_unpack_be()
This commit is contained in:
Andrey Volk 2020-02-26 23:19:42 +04:00 committed by GitHub
commit 2d354257bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -94,15 +94,13 @@ extern switch_bool_t switch_amr_pack_be(unsigned char *shift_buf, int n)
extern switch_bool_t switch_amr_unpack_be(unsigned char *encoded_buf, uint8_t *tmp, int encoded_len)
{
int framesz, index, ft;
int framesz, index;
uint8_t shift_tocs[2] = {0x00, 0x00};
uint8_t *shift_buf;
memcpy(shift_tocs, encoded_buf, 2);
/* shift for BE */
switch_amr_array_lshift(4, shift_tocs, 2);
ft = shift_tocs[0] >> 3;
ft &= ~(1 << 5); /* Frame Type*/
shift_buf = encoded_buf + 1; /* skip CMR */
/* shift for BE */
switch_amr_array_lshift(2, shift_buf, encoded_len - 1);