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 with GCC16 in apps/
The compiler is smart enough to optimize away dead stores but let's just get rid of them in the first place Change-Id: I5c85d7c05ef03b084205356a21248f7b049296b0
This commit is contained in:
parent
2c0381a34e
commit
cae433608f
5 changed files with 27 additions and 9 deletions
11
apps/misc.c
11
apps/misc.c
|
|
@ -1354,7 +1354,10 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
|
||||||
const char * const sign = &"-"[value < 0 ? 0 : 1];
|
const char * const sign = &"-"[value < 0 ? 0 : 1];
|
||||||
bool is_rtl = lang_is_rtl();
|
bool is_rtl = lang_is_rtl();
|
||||||
char timebuf[25]; /* -2147483648:00:00.00\0 */
|
char timebuf[25]; /* -2147483648:00:00.00\0 */
|
||||||
int len, left_offset;
|
int len;
|
||||||
|
#if 0 /* unused */
|
||||||
|
int left_offset;
|
||||||
|
#endif
|
||||||
unsigned char base_idx, max_idx;
|
unsigned char base_idx, max_idx;
|
||||||
|
|
||||||
unsigned long units_in[UNIT_IDX_TIME_COUNT];
|
unsigned long units_in[UNIT_IDX_TIME_COUNT];
|
||||||
|
|
@ -1427,8 +1430,10 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
|
||||||
|
|
||||||
timebuf[offsets[base_idx] + fwidth[base_idx]] = '\0';
|
timebuf[offsets[base_idx] + fwidth[base_idx]] = '\0';
|
||||||
|
|
||||||
|
#if 0 /* unused */
|
||||||
left_offset = -(offsets[max_idx]);
|
left_offset = -(offsets[max_idx]);
|
||||||
left_offset += strlcpy(buffer, sign, buf_len);
|
left_offset += strlcpy(buffer, sign, buf_len);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* trim leading zero on the max_idx */
|
/* trim leading zero on the max_idx */
|
||||||
if ((unit_idx & UNIT_TRIM_ZERO) == UNIT_TRIM_ZERO &&
|
if ((unit_idx & UNIT_TRIM_ZERO) == UNIT_TRIM_ZERO &&
|
||||||
|
|
@ -1456,7 +1461,9 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
|
||||||
|
|
||||||
fwidth[UNIT_IDX_HR] = len - offsets[UNIT_IDX_HR];
|
fwidth[UNIT_IDX_HR] = len - offsets[UNIT_IDX_HR];
|
||||||
|
|
||||||
|
#if 0 /* unused */
|
||||||
left_offset = -(offsets[base_idx]);
|
left_offset = -(offsets[base_idx]);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* trim leading zero on the max_idx */
|
/* trim leading zero on the max_idx */
|
||||||
if ((unit_idx & UNIT_TRIM_ZERO) == UNIT_TRIM_ZERO &&
|
if ((unit_idx & UNIT_TRIM_ZERO) == UNIT_TRIM_ZERO &&
|
||||||
|
|
@ -1471,7 +1478,9 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
|
||||||
if (!supress_unit)
|
if (!supress_unit)
|
||||||
{
|
{
|
||||||
strmemccpy(buffer, unit_strings_core[units[max_idx]], buf_len);
|
strmemccpy(buffer, unit_strings_core[units[max_idx]], buf_len);
|
||||||
|
#if 0 /* unused */
|
||||||
left_offset += strlcat(buffer, " ", buf_len);
|
left_offset += strlcat(buffer, " ", buf_len);
|
||||||
|
#endif
|
||||||
strlcat(buffer, &timebuf[offsets[base_idx]], buf_len);
|
strlcat(buffer, &timebuf[offsets[base_idx]], buf_len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1376,7 +1376,7 @@ static void chip8_sound_off (void)
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
static void chip8_update_display(void)
|
static void chip8_update_display(void)
|
||||||
{
|
{
|
||||||
int x, lcd_x, y, i;
|
int x, y, i;
|
||||||
byte w;
|
byte w;
|
||||||
byte* row;
|
byte* row;
|
||||||
/* frame buffer in hardware fomat */
|
/* frame buffer in hardware fomat */
|
||||||
|
|
@ -1385,7 +1385,7 @@ static void chip8_update_display(void)
|
||||||
for (y=0;y<CHIP8_HEIGHT/8;++y)
|
for (y=0;y<CHIP8_HEIGHT/8;++y)
|
||||||
{
|
{
|
||||||
row = lcd_framebuf[y];
|
row = lcd_framebuf[y];
|
||||||
for (x=0, lcd_x=0;x<CHIP8_WIDTH;++x,++lcd_x)
|
for (x=0;x<CHIP8_WIDTH;++x)
|
||||||
{
|
{
|
||||||
w = 0;
|
w = 0;
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
|
|
|
||||||
|
|
@ -760,7 +760,9 @@ static int pbl_copyloop(int fd_copy, const char *src_filename,
|
||||||
struct scrobbler_entry entry;
|
struct scrobbler_entry entry;
|
||||||
long next_tick = *rb->current_tick;
|
long next_tick = *rb->current_tick;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
#ifdef LOGF_ENABLE
|
||||||
int line_num = 0;
|
int line_num = 0;
|
||||||
|
#endif
|
||||||
int lines_copied = 0;
|
int lines_copied = 0;
|
||||||
int fd_src = rb->open_utf8(src_filename, O_RDONLY);
|
int fd_src = rb->open_utf8(src_filename, O_RDONLY);
|
||||||
if (fd_src < 0)
|
if (fd_src < 0)
|
||||||
|
|
@ -773,7 +775,9 @@ static int pbl_copyloop(int fd_copy, const char *src_filename,
|
||||||
while(rb->read_line(fd_src, buf, buf_sz) > 0)
|
while(rb->read_line(fd_src, buf, buf_sz) > 0)
|
||||||
{
|
{
|
||||||
char skipch = ' ';
|
char skipch = ' ';
|
||||||
|
#ifdef LOGF_ENABLE
|
||||||
line_num++;
|
line_num++;
|
||||||
|
#endif
|
||||||
do_timed_yield();
|
do_timed_yield();
|
||||||
if (buf[0] == '\0') /* skip empty lines */
|
if (buf[0] == '\0') /* skip empty lines */
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -911,7 +915,9 @@ static int sbl_export(void)
|
||||||
|
|
||||||
struct scrobbler_entry entry;
|
struct scrobbler_entry entry;
|
||||||
int rd = 0;
|
int rd = 0;
|
||||||
|
#ifdef LOGF_ENABLE
|
||||||
int line_num = 0;
|
int line_num = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
scrobbler_fd = sbl_open_create();
|
scrobbler_fd = sbl_open_create();
|
||||||
if (scrobbler_fd >= 0)
|
if (scrobbler_fd >= 0)
|
||||||
|
|
@ -921,7 +927,9 @@ static int sbl_export(void)
|
||||||
{
|
{
|
||||||
if ((rd = rb->read_line(fd_copy, buf, sizeof(buf))) <= 0)
|
if ((rd = rb->read_line(fd_copy, buf, sizeof(buf))) <= 0)
|
||||||
break;
|
break;
|
||||||
|
#ifdef LOGF_ENABLE
|
||||||
line_num++;
|
line_num++;
|
||||||
|
#endif
|
||||||
if (buf[0] != ' ') /* skip culled entries comments and empty lines */
|
if (buf[0] != ' ') /* skip culled entries comments and empty lines */
|
||||||
continue;
|
continue;
|
||||||
pbl_parse_valid_entry(&entry, buf);
|
pbl_parse_valid_entry(&entry, buf);
|
||||||
|
|
|
||||||
|
|
@ -1863,11 +1863,12 @@ void window_subband2(short *x1, int a[SBLIMIT])
|
||||||
{
|
{
|
||||||
int xr;
|
int xr;
|
||||||
short const *wp = enwindow;
|
short const *wp = enwindow;
|
||||||
short *x2 = x1 - 124;
|
// short *x2 = x1 - 124;
|
||||||
|
|
||||||
wp += 27 * 15;
|
wp += 27 * 15;
|
||||||
x1 -= 2 * 15;
|
// x1 -= 2 * 15;
|
||||||
x2 += 2 * 15;
|
// x2 += 2 * 15;
|
||||||
|
(void)x1;
|
||||||
|
|
||||||
xr = a[28] - a[0]; a[0] += a[28]; a[28] = shft9(xr) * wp[-2*27+25];
|
xr = a[28] - a[0]; a[0] += a[28]; a[28] = shft9(xr) * wp[-2*27+25];
|
||||||
xr = a[29] - a[1]; a[1] += a[29]; a[29] = shft9(xr) * wp[-2*27+25];
|
xr = a[29] - a[1]; a[1] += a[29]; a[29] = shft9(xr) * wp[-2*27+25];
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ static int readwavpeaks(const char *filename)
|
||||||
int hours;
|
int hours;
|
||||||
int minutes;
|
int minutes;
|
||||||
int seconds;
|
int seconds;
|
||||||
uint32_t peakcount = 0;
|
// uint32_t peakcount = 0;
|
||||||
struct peakstruct* peak = NULL;
|
struct peakstruct* peak = NULL;
|
||||||
|
|
||||||
if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav"))
|
if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav"))
|
||||||
|
|
@ -207,7 +207,7 @@ static int readwavpeaks(const char *filename)
|
||||||
sampleval = letoh16(*(sampleshort+1));
|
sampleval = letoh16(*(sampleshort+1));
|
||||||
peak->rmin = sampleval;
|
peak->rmin = sampleval;
|
||||||
peak->rmax = sampleval;
|
peak->rmax = sampleval;
|
||||||
|
|
||||||
while(bytes_read)
|
while(bytes_read)
|
||||||
{
|
{
|
||||||
sampleval = letoh16(*sampleshort++);
|
sampleval = letoh16(*sampleshort++);
|
||||||
|
|
@ -223,7 +223,7 @@ static int readwavpeaks(const char *filename)
|
||||||
peak->rmax = sampleval;
|
peak->rmax = sampleval;
|
||||||
|
|
||||||
bytes_read -= 4;
|
bytes_read -= 4;
|
||||||
peakcount++;
|
// peakcount++;
|
||||||
fppmp_count--;
|
fppmp_count--;
|
||||||
if(!fppmp_count)
|
if(!fppmp_count)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue