misc: Fix more build warnings uncovered with GCC15 and -Wunused-const-variable

Change-Id: I43f5d03d8496b2ac8b30df30b14d1c6e816ef0e2
This commit is contained in:
Solomon Peachy 2025-04-21 21:53:56 -04:00
parent 9d4632b0c3
commit 3b974e791a
4 changed files with 8 additions and 4 deletions

View file

@ -155,7 +155,7 @@ MAKE_MENU(colors_settings, ID2P(LANG_COLORS_MENU),
&lss_settings, &set_sep_col, &lss_settings, &set_sep_col,
&set_bg_col, &set_fg_col, &reset_colors &set_bg_col, &set_fg_col, &reset_colors
); );
#endif /* HAVE_LCD_COLOR */ #endif /* HAVE_LCD_COLOR */
/* LCD MENU */ /* LCD MENU */
/***********************************/ /***********************************/
@ -211,12 +211,14 @@ MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
statusbar_callback_remote); statusbar_callback_remote);
#endif #endif
MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL); MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
#if (CONFIG_BATTERY_MEASURE != 0)
MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL); MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
#endif
MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON, MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
&scrollbar_item, &scrollbar_width, &statusbar, &scrollbar_item, &scrollbar_width, &statusbar,
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
&remote_statusbar, &remote_statusbar,
#endif #endif
&volume_type &volume_type
#if (CONFIG_BATTERY_MEASURE != 0) #if (CONFIG_BATTERY_MEASURE != 0)
, &battery_display , &battery_display

View file

@ -143,6 +143,7 @@ typedef int32_t fixed;
#define LCD_FACTOR (fp_div(int2fixed(LCD_WIDTH), int2fixed(100))) #define LCD_FACTOR (fp_div(int2fixed(LCD_WIDTH), int2fixed(100)))
/* The threshold for the YIN algorithm */ /* The threshold for the YIN algorithm */
#define DEFAULT_YIN_THRESHOLD 5 /* 0.10 */ #define DEFAULT_YIN_THRESHOLD 5 /* 0.10 */
#ifndef SIMULATOR
static const fixed yin_threshold_table[] IDATA_ATTR = static const fixed yin_threshold_table[] IDATA_ATTR =
{ {
float2fixed(0.01), float2fixed(0.01),
@ -160,6 +161,7 @@ static const fixed yin_threshold_table[] IDATA_ATTR =
float2fixed(0.45), float2fixed(0.45),
float2fixed(0.50), float2fixed(0.50),
}; };
#endif /* !SIMULATOR */
/* Structure for the reference frequency (frequency of A) /* Structure for the reference frequency (frequency of A)
* It's used for scaling the frequency before finding out * It's used for scaling the frequency before finding out

View file

@ -209,7 +209,7 @@ int make_table(int nchar, uchar * bitlen, int tablebits, ushort * table)
} }
/* huf.c */ /* huf.c */
#if (__GNUC__ == 14) // XXX nuke later? #if (__GNUC__ >= 14) // XXX nuke later?
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow" #pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif #endif

View file

@ -207,7 +207,7 @@ void celt_iir(const opus_val32 *_x,
#endif #endif
} }
#if (__GNUC__ == 14) // XXX nuke later? #if (__GNUC__ >= 14) // XXX nuke later?
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif #endif