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:
Solomon Peachy 2026-05-17 08:02:17 -04:00
parent 2c0381a34e
commit cae433608f
5 changed files with 27 additions and 9 deletions

View file

@ -1354,7 +1354,10 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
const char * const sign = &"-"[value < 0 ? 0 : 1];
bool is_rtl = lang_is_rtl();
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 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';
#if 0 /* unused */
left_offset = -(offsets[max_idx]);
left_offset += strlcpy(buffer, sign, buf_len);
#endif
/* trim leading zero on the max_idx */
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];
#if 0 /* unused */
left_offset = -(offsets[base_idx]);
#endif
/* trim leading zero on the max_idx */
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)
{
strmemccpy(buffer, unit_strings_core[units[max_idx]], buf_len);
#if 0 /* unused */
left_offset += strlcat(buffer, " ", buf_len);
#endif
strlcat(buffer, &timebuf[offsets[base_idx]], buf_len);
}
else

View file

@ -1376,7 +1376,7 @@ static void chip8_sound_off (void)
/****************************************************************************/
static void chip8_update_display(void)
{
int x, lcd_x, y, i;
int x, y, i;
byte w;
byte* row;
/* frame buffer in hardware fomat */
@ -1385,7 +1385,7 @@ static void chip8_update_display(void)
for (y=0;y<CHIP8_HEIGHT/8;++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;
for (i=0;i<8;i++)

View file

@ -760,7 +760,9 @@ static int pbl_copyloop(int fd_copy, const char *src_filename,
struct scrobbler_entry entry;
long next_tick = *rb->current_tick;
int count = 0;
#ifdef LOGF_ENABLE
int line_num = 0;
#endif
int lines_copied = 0;
int fd_src = rb->open_utf8(src_filename, O_RDONLY);
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)
{
char skipch = ' ';
#ifdef LOGF_ENABLE
line_num++;
#endif
do_timed_yield();
if (buf[0] == '\0') /* skip empty lines */
continue;
@ -911,7 +915,9 @@ static int sbl_export(void)
struct scrobbler_entry entry;
int rd = 0;
#ifdef LOGF_ENABLE
int line_num = 0;
#endif
scrobbler_fd = sbl_open_create();
if (scrobbler_fd >= 0)
@ -921,7 +927,9 @@ static int sbl_export(void)
{
if ((rd = rb->read_line(fd_copy, buf, sizeof(buf))) <= 0)
break;
#ifdef LOGF_ENABLE
line_num++;
#endif
if (buf[0] != ' ') /* skip culled entries comments and empty lines */
continue;
pbl_parse_valid_entry(&entry, buf);

View file

@ -1863,11 +1863,12 @@ void window_subband2(short *x1, int a[SBLIMIT])
{
int xr;
short const *wp = enwindow;
short *x2 = x1 - 124;
// short *x2 = x1 - 124;
wp += 27 * 15;
x1 -= 2 * 15;
x2 += 2 * 15;
// x1 -= 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[29] - a[1]; a[1] += a[29]; a[29] = shft9(xr) * wp[-2*27+25];

View file

@ -112,7 +112,7 @@ static int readwavpeaks(const char *filename)
int hours;
int minutes;
int seconds;
uint32_t peakcount = 0;
// uint32_t peakcount = 0;
struct peakstruct* peak = NULL;
if(rb->strcasecmp (filename + rb->strlen (filename) - 3, "wav"))
@ -207,7 +207,7 @@ static int readwavpeaks(const char *filename)
sampleval = letoh16(*(sampleshort+1));
peak->rmin = sampleval;
peak->rmax = sampleval;
while(bytes_read)
{
sampleval = letoh16(*sampleshort++);
@ -223,7 +223,7 @@ static int readwavpeaks(const char *filename)
peak->rmax = sampleval;
bytes_read -= 4;
peakcount++;
// peakcount++;
fppmp_count--;
if(!fppmp_count)
{