forked from len0rd/rockbox
misc: Clean up a pile of -Wunused-const-variable warnings
And re-enable the warning (applies to GCC 6+) Change-Id: I7aa679ec65707db12de83c0433966b3821d07087
This commit is contained in:
parent
c7eda36341
commit
9d4632b0c3
11 changed files with 29 additions and 17 deletions
|
@ -82,9 +82,11 @@ static const unsigned int WINNING_TILE = 2048;
|
|||
# define BEST_SCORE_Y (2*max_numeral_height)
|
||||
#endif /* LCD_WIDTH < LCD_HEIGHT */
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
/* where to draw the background bitmap */
|
||||
static const int BACKGROUND_X = (BASE_X-MIN_SPACE);
|
||||
static const int BACKGROUND_Y = (BASE_Y-MIN_SPACE);
|
||||
#endif
|
||||
|
||||
/* key mappings */
|
||||
#define KEY_UP PLA_UP
|
||||
|
|
|
@ -270,8 +270,8 @@ void xlcd_drawcircle(int cx, int cy, int radius)
|
|||
|
||||
|
||||
#if LCD_DEPTH >= 8 && LCD_DEPTH <= 16
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
#if 0 /* unused functions, enable when needed */
|
||||
#if defined(HAVE_LCD_COLOR) && (LCD_DEPTH == 16)
|
||||
static const fb_data graylut[256] = {
|
||||
#if LCD_PIXELFORMAT == RGB565
|
||||
0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0821, 0x0821, 0x0841,
|
||||
|
@ -341,10 +341,8 @@ static const fb_data graylut[256] = {
|
|||
0xbef7, 0xdef7, 0xdef7, 0xdfff, 0xdfff, 0xffff, 0xffff, 0xffff
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
};
|
||||
#endif /* HAVE_LCD_COLOR */
|
||||
#endif /* HAVE_LCD_COLOR && LCD_DEPTH == 16 */
|
||||
|
||||
/* unused functions, enable when needed */
|
||||
#if 0
|
||||
/* Draw a partial greyscale bitmap, canonical 8 bit format */
|
||||
void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
|
||||
int stride, int x, int y, int width, int height)
|
||||
|
@ -412,7 +410,7 @@ void xlcd_gray_bitmap(const unsigned char *src, int x, int y, int width,
|
|||
{
|
||||
xlcd_gray_bitmap_part(src, 0, 0, width, x, y, width, height);
|
||||
}
|
||||
#endif
|
||||
#endif // unused functions
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
/* Draw a partial colour bitmap, canonical 24 bit RGB format */
|
||||
|
|
|
@ -183,6 +183,7 @@ static int font_height = 0;
|
|||
|
||||
/* - - - TINYFONT - - - */
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
static const long int periodic_tinyfont_bitmaps[] = {
|
||||
0x00000000, 0x00220200, 0x00550000, 0x00575750, 0x00236200, 0x00514500, 0x00236300, 0x00220000,
|
||||
0x00244200, 0x00211200, 0x00272720, 0x00027200, 0x00000240, 0x00007000, 0x00000200, 0x00122400,
|
||||
|
@ -200,7 +201,6 @@ static const long int periodic_tinyfont_bitmaps[] = {
|
|||
0x00052500, 0x00055360, 0x00072700, 0x00162100, 0x00222220, 0x00432400, 0x00630000, 0x00525250
|
||||
};
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
static void periodic_tinyfont_draw_char(int x, int y, char ch)
|
||||
{
|
||||
int i,j;
|
||||
|
@ -234,7 +234,7 @@ static void periodic_tinyfont_draw_string(int x, int y, char * s)
|
|||
t++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* LCD_DEPTH > 1 */
|
||||
|
||||
/*
|
||||
void periodic_tinyfont_draw_chart(int x, int y, ttk_color col)
|
||||
|
|
|
@ -485,7 +485,7 @@ static const struct root_items items[] = {
|
|||
[GO_TO_SHORTCUTMENU] = { do_shortcut_menu, NULL, NULL },
|
||||
|
||||
};
|
||||
static const int nb_items = sizeof(items)/sizeof(*items);
|
||||
//static const int nb_items = sizeof(items)/sizeof(*items);
|
||||
|
||||
static int item_callback(int action,
|
||||
const struct menu_item_ex *this_item,
|
||||
|
|
|
@ -224,7 +224,9 @@ static const char off_number_spell[] = "off,number,spell";
|
|||
static const int timeout_sec_common[] = {-1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,
|
||||
45,60,90,120,180,240,300,600,900,1200,
|
||||
1500,1800,2700,3600,4500,5400,6300,7200};
|
||||
#if defined(HAVE_RECORDING)
|
||||
static const int time_recording_trigger[] = {0,1,2,5,10,15,20,25,30,60,120,300,600};
|
||||
#endif
|
||||
#if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
|
||||
static const int backlight_fade[] = {0,100,200,300,500,1000,2000,3000,5000,10000};
|
||||
#endif
|
||||
|
@ -1017,7 +1019,7 @@ const struct settings_list settings[] = {
|
|||
play_frequency, LANG_FREQUENCY, 0, "playback frequency", "auto",
|
||||
UNIT_KHZ, formatter_freq_unit_0_is_auto,
|
||||
getlang_freq_unit_0_is_auto,
|
||||
playback_frequency_callback,
|
||||
playback_frequency_callback,
|
||||
#if HAVE_PLAY_FREQ >= 192
|
||||
7,0,SAMPR_44,SAMPR_48,SAMPR_88,SAMPR_96,SAMPR_176,SAMPR_192),
|
||||
#elif HAVE_PLAY_FREQ >= 96
|
||||
|
@ -1138,7 +1140,7 @@ const struct settings_list settings[] = {
|
|||
INT_SETTING(F_BANFROMQS, max_files_in_playlist,
|
||||
LANG_MAX_FILES_IN_PLAYLIST,
|
||||
#if CONFIG_CPU == PP5002 || CONFIG_CPU == PP5020 || CONFIG_CPU == PP5022
|
||||
/** Slow CPU benefits greatly from building smaller playlists
|
||||
/** Slow CPU benefits greatly from building smaller playlists
|
||||
On the iPod Mini 2nd gen, creating a playlist of 2000 entries takes around 10 seconds */
|
||||
2000,
|
||||
#elif MEMORYSIZE > 1
|
||||
|
@ -1896,7 +1898,7 @@ const struct settings_list settings[] = {
|
|||
#ifdef HAVE_BACKLIGHT
|
||||
CHOICE_SETTING(0, backlight_on_button_hold,
|
||||
LANG_BACKLIGHT_ON_BUTTON_HOLD,
|
||||
#ifdef HAS_BUTTON_HOLD
|
||||
#ifdef HAS_BUTTON_HOLD
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
|
|
|
@ -158,12 +158,14 @@ static const char* const dw_state_str[EP0_NUM_STATES] =
|
|||
[EP0_STATUS_OUT] = "sts_out",
|
||||
};
|
||||
|
||||
#if 0
|
||||
static const char* const dw_resp_str[3] =
|
||||
{
|
||||
[USB_CONTROL_ACK] = "ACK",
|
||||
[USB_CONTROL_RECEIVE] = "RECV",
|
||||
[USB_CONTROL_STALL] = "STALL",
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct usb_dw_ep usb_dw_ep_list[USB_NUM_ENDPOINTS][USB_DW_NUM_DIRS];
|
||||
static struct usb_dw_ep0 ep0;
|
||||
|
|
|
@ -116,11 +116,13 @@ int sb_decoder_ctl(void *state, int request, void *ptr)
|
|||
|
||||
#ifdef FIXED_POINT
|
||||
static const spx_word16_t gc_quant_bound[16] ICONST_ATTR = {125, 164, 215, 282, 370, 484, 635, 832, 1090, 1428, 1871, 2452, 3213, 4210, 5516, 7228};
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
static const spx_word16_t fold_quant_bound[32] ICONST_ATTR = {
|
||||
39, 44, 50, 57, 64, 73, 83, 94,
|
||||
106, 120, 136, 154, 175, 198, 225, 255,
|
||||
288, 327, 370, 420, 476, 539, 611, 692,
|
||||
784, 889, 1007, 1141, 1293, 1465, 1660, 1881};
|
||||
#endif
|
||||
#define LSP_MARGIN 410
|
||||
#define LSP_DELTA1 6553
|
||||
#define LSP_DELTA2 1638
|
||||
|
@ -188,7 +190,7 @@ static const float h0[64] = {
|
|||
extern const spx_word16_t lag_window[];
|
||||
extern const spx_word16_t lpc_window[];
|
||||
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
void *sb_encoder_init(const SpeexMode *m)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -58,12 +58,14 @@ static const float e_ratio_quant[4] = {.25f, .315f, .397f, .5f};
|
|||
static const float e_ratio_quant_bounds[3] = {0.2825f, 0.356f, 0.4485f};
|
||||
#else
|
||||
static const spx_word16_t e_ratio_quant[4] = {8192, 10332, 13009, 16384};
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
static const spx_word16_t e_ratio_quant_bounds[3] = {9257, 11665, 14696};
|
||||
static const spx_word16_t balance_bounds[31] = {18, 23, 30, 38, 49, 63, 81, 104,
|
||||
134, 172, 221, 284, 364, 468, 600, 771,
|
||||
990, 1271, 1632, 2096, 2691, 3455, 4436, 5696,
|
||||
7314, 9392, 12059, 15484, 19882, 25529, 32766};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* This is an ugly compatibility hack that properly resets the stereo state
|
||||
In case it it compiled in fixed-point, but initialised with the deprecated
|
||||
|
|
|
@ -117,6 +117,7 @@ static inline ogg_int32_t toBARK(int n){
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _V_LSP_MATH_ASM
|
||||
static const unsigned char MLOOP_1[64] ={
|
||||
0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13,
|
||||
14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14,
|
||||
|
@ -132,6 +133,7 @@ static const unsigned char MLOOP_2[64] ={
|
|||
};
|
||||
|
||||
static const unsigned char MLOOP_3[8] ={0,1,2,2,3,3,3,3};
|
||||
#endif
|
||||
|
||||
static void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
|
||||
ogg_int32_t *lsp,int m,
|
||||
|
|
|
@ -50,6 +50,7 @@ struct asf_object_s {
|
|||
};
|
||||
typedef struct asf_object_s asf_object_t;
|
||||
|
||||
#if 0
|
||||
static const guid_t asf_guid_null =
|
||||
{0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
|
@ -58,11 +59,12 @@ static const guid_t asf_guid_null =
|
|||
static const guid_t asf_guid_header =
|
||||
{0x75B22630, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
|
||||
|
||||
static const guid_t asf_guid_data =
|
||||
{0x75B22636, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
|
||||
|
||||
static const guid_t asf_guid_index =
|
||||
{0x33000890, 0xE5B1, 0x11CF, {0x89, 0xF4, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB}};
|
||||
#endif
|
||||
|
||||
static const guid_t asf_guid_data =
|
||||
{0x75B22636, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
|
||||
|
||||
/* header level object guids */
|
||||
|
||||
|
|
2
tools/configure
vendored
2
tools/configure
vendored
|
@ -4609,7 +4609,7 @@ else
|
|||
if test "$gccnum" -ge "601"; then
|
||||
# gcc 6 adds a lot of warnings that while useful are too time-consuming
|
||||
# to clean up right away
|
||||
GCCOPTS="$GCCOPTS -Wno-shift-negative-value -Wno-unused-const-variable -Wno-nonnull-compare -Wno-tautological-compare"
|
||||
GCCOPTS="$GCCOPTS -Wno-shift-negative-value -Wno-nonnull-compare -Wno-tautological-compare"
|
||||
fi
|
||||
|
||||
if test "$gccnum" -ge "700"; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue