mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
build: Silence a pile of set-but-not-used warnings in codecs
GCC16 is stricter about reporting these, and while we can rely on the compiler to optimize away dead stores, we're better off eliminating them from the source code. Change-Id: I14570a986811a77ca656c60d792593ff8c458571
This commit is contained in:
parent
8abc859c32
commit
39497d1c74
7 changed files with 67 additions and 61 deletions
|
|
@ -68,7 +68,7 @@ enum codec_status codec_run(void)
|
|||
{
|
||||
int datasize, res, consumed, i, time_offset;
|
||||
uint16_t fs,sps,h;
|
||||
uint32_t packet_count;
|
||||
// uint32_t packet_count;
|
||||
int spn, packet_header_size, scrambling_unit_size, num_units, elapsed;
|
||||
int playback_on = -1;
|
||||
size_t resume_offset;
|
||||
|
|
@ -99,7 +99,7 @@ enum codec_status codec_run(void)
|
|||
|
||||
packet_header_size = PACKET_HEADER_SIZE +
|
||||
((rmctx.flags & RM_PKT_V1) ? 1 : 0);
|
||||
packet_count = rmctx.nb_packets;
|
||||
// packet_count = rmctx.nb_packets;
|
||||
rmctx.audio_framesize = rmctx.block_align;
|
||||
rmctx.block_align = rmctx.sub_packet_size;
|
||||
fs = rmctx.audio_framesize;
|
||||
|
|
@ -168,7 +168,7 @@ seek_start :
|
|||
}
|
||||
|
||||
ci->seek_buffer(rmctx.data_offset + DATA_HEADER_SIZE);
|
||||
packet_count = rmctx.nb_packets;
|
||||
// packet_count = rmctx.nb_packets;
|
||||
rmctx.audio_pkt_cnt = 0;
|
||||
rmctx.frame_number = 0;
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ seek_start :
|
|||
return CODEC_OK;
|
||||
}
|
||||
|
||||
packet_count = rmctx.nb_packets - h * num_units;
|
||||
// packet_count = rmctx.nb_packets - h * num_units;
|
||||
rmctx.frame_number = (param/(sps*1000*8/rmctx.bit_rate));
|
||||
while (rmctx.audiotimestamp > (unsigned)param && num_units-- > 0) {
|
||||
rmctx.audio_pkt_cnt = 0;
|
||||
|
|
@ -213,7 +213,7 @@ seek_start :
|
|||
return CODEC_OK;
|
||||
}
|
||||
|
||||
packet_count += h;
|
||||
// packet_count += h;
|
||||
}
|
||||
|
||||
if (num_units < 0)
|
||||
|
|
@ -244,7 +244,7 @@ seek_start :
|
|||
ci->set_elapsed(elapsed);
|
||||
rmctx.frame_number++;
|
||||
}
|
||||
packet_count -= h;
|
||||
// packet_count -= h;
|
||||
rmctx.audio_pkt_cnt = 0;
|
||||
ci->advance_buffer(scrambling_unit_size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -468,7 +468,9 @@ enum codec_status codec_run(void)
|
|||
size_t bytesleft;
|
||||
int consumed;
|
||||
int res;
|
||||
#ifdef LOGF_ENABLE
|
||||
int frame;
|
||||
#endif
|
||||
intptr_t param;
|
||||
|
||||
if (codec_init()) {
|
||||
|
|
@ -503,7 +505,9 @@ enum codec_status codec_run(void)
|
|||
ci->set_elapsed(elapsedtime);
|
||||
|
||||
/* The main decoding loop */
|
||||
#ifdef LOGF_ENABLE
|
||||
frame=0;
|
||||
#endif
|
||||
buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE);
|
||||
while (bytesleft) {
|
||||
long action = ci->get_command(¶m);
|
||||
|
|
@ -529,7 +533,9 @@ enum codec_status codec_run(void)
|
|||
return CODEC_ERROR;
|
||||
}
|
||||
consumed=fc.gb.index/8;
|
||||
#ifdef LOGF_ENABLE
|
||||
frame++;
|
||||
#endif
|
||||
|
||||
ci->yield();
|
||||
ci->pcmbuf_insert(&fc.decoded[0][fc.sample_skip], &fc.decoded[1][fc.sample_skip],
|
||||
|
|
|
|||
|
|
@ -306,10 +306,10 @@ int asf_get_timestamp(int *duration)
|
|||
uint32_t padding_length;
|
||||
*/
|
||||
uint32_t send_time;
|
||||
static int packet_count = 0;
|
||||
// static int packet_count = 0;
|
||||
|
||||
uint32_t bytesread = 0;
|
||||
packet_count++;
|
||||
// packet_count++;
|
||||
if (ci->read_filebuf(&tmp8, 1) == 0) {
|
||||
DEBUGF("ASF ERROR (EOF?)\n");
|
||||
return ASF_ERROR_EOF;
|
||||
|
|
|
|||
|
|
@ -158,20 +158,21 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
unsigned int i;
|
||||
int j;
|
||||
uint32_t numentries;
|
||||
size_t size_remaining = chunk_len - 8;
|
||||
// size_t size_remaining = chunk_len - 8;
|
||||
bool got_codec_data = false;
|
||||
(void)chunk_len;
|
||||
|
||||
/* version */
|
||||
stream_read_uint8(qtmovie->stream);
|
||||
size_remaining -= 1;
|
||||
// size_remaining -= 1;
|
||||
/* flags */
|
||||
stream_read_uint8(qtmovie->stream);
|
||||
stream_read_uint8(qtmovie->stream);
|
||||
stream_read_uint8(qtmovie->stream);
|
||||
size_remaining -= 3;
|
||||
// size_remaining -= 3;
|
||||
|
||||
numentries = stream_read_uint32(qtmovie->stream);
|
||||
size_remaining -= 4;
|
||||
// size_remaining -= 4;
|
||||
|
||||
/* if (numentries != 1)
|
||||
{
|
||||
|
|
@ -866,5 +867,3 @@ int qtmovie_read(stream_t *file, demux_res_t *demux_res)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -910,6 +910,8 @@ static unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y,
|
|||
int encode;
|
||||
ec_ctx *ec;
|
||||
|
||||
(void)b;
|
||||
|
||||
encode = ctx->encode;
|
||||
ec = ctx->ec;
|
||||
|
||||
|
|
@ -1669,4 +1671,3 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
|||
|
||||
RESTORE_STACK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1299,7 +1299,7 @@ enum codec_status codec_run(void)
|
|||
size_t n;
|
||||
unsigned char *modfile;
|
||||
int old_patterntableposition;
|
||||
int bytesdone;
|
||||
// int bytesdone;
|
||||
intptr_t param;
|
||||
|
||||
if (codec_init()) {
|
||||
|
|
@ -1329,7 +1329,7 @@ enum codec_status codec_run(void)
|
|||
|
||||
ci->set_elapsed(modplayer.patterntableposition*1000);
|
||||
|
||||
bytesdone = 0;
|
||||
// bytesdone = 0;
|
||||
old_patterntableposition = 0;
|
||||
|
||||
while (1) {
|
||||
|
|
@ -1352,7 +1352,7 @@ enum codec_status codec_run(void)
|
|||
|
||||
synthrender(samples, CHUNK_SIZE/2);
|
||||
|
||||
bytesdone += CHUNK_SIZE;
|
||||
// bytesdone += CHUNK_SIZE;
|
||||
|
||||
ci->pcmbuf_insert(samples, NULL, CHUNK_SIZE/2);
|
||||
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ next_page:
|
|||
|
||||
/* Loop for all complete pages we got (most likely only one) */
|
||||
while (spx_ogg_sync_pageout(&oy, &og) == 1) {
|
||||
int packet_no;
|
||||
// int packet_no;
|
||||
if (stream_init == 0) {
|
||||
spx_ogg_stream_init(&os, spx_ogg_page_serialno(&og));
|
||||
stream_init = 1;
|
||||
|
|
@ -488,7 +488,7 @@ next_page:
|
|||
cur_granule = page_granule;
|
||||
|
||||
/* Extract all available packets */
|
||||
packet_no=0;
|
||||
// packet_no=0;
|
||||
|
||||
while (!eos && spx_ogg_stream_packetout(&os, &op)==1){
|
||||
/* If first packet, process as Speex header */
|
||||
|
|
@ -531,7 +531,7 @@ next_page:
|
|||
goto next_page;
|
||||
}
|
||||
}
|
||||
packet_no++;
|
||||
// packet_no++;
|
||||
|
||||
if (op.e_o_s) /* End of stream condition */
|
||||
eos=1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue