mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Remove some shadowed variables identified by -Wshadow
there are plenty more but these are the low hanging fruit Change-Id: I86d9f4f56e8cd9b381d1bf6a6679cd58c6a4004d
This commit is contained in:
parent
f94a14b859
commit
034b6d5bfb
9 changed files with 12 additions and 15 deletions
|
@ -65,7 +65,7 @@ static bool search_for_cuesheet(const char *path, struct cuesheet_file *cue_file
|
||||||
strcpy(cuepath, CUE_DIR);
|
strcpy(cuepath, CUE_DIR);
|
||||||
if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH)
|
if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH)
|
||||||
goto skip; /* overflow */
|
goto skip; /* overflow */
|
||||||
char *dot = strrchr(cuepath, '.');
|
dot = strrchr(cuepath, '.');
|
||||||
strcpy(dot, ".cue");
|
strcpy(dot, ".cue");
|
||||||
if (!file_exists(cuepath))
|
if (!file_exists(cuepath))
|
||||||
{
|
{
|
||||||
|
|
|
@ -667,7 +667,7 @@ int ft_enter(struct tree_context* c)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct entry* file = tree_get_entry_at(c, c->selected_item);
|
file = tree_get_entry_at(c, c->selected_item);
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
splashf(HZ, str(LANG_READ_FAILED), str(LANG_UNKNOWN));
|
splashf(HZ, str(LANG_READ_FAILED), str(LANG_UNKNOWN));
|
||||||
|
|
|
@ -208,7 +208,7 @@ static struct folder* load_folder(struct folder* parent, char *folder)
|
||||||
if ((dn[0] == '.') && (dn[1] == '\0' || (dn[1] == '.' && dn[2] == '\0')))
|
if ((dn[0] == '.') && (dn[1] == '\0' || (dn[1] == '.' && dn[2] == '\0')))
|
||||||
continue;
|
continue;
|
||||||
/* copy entry name to end of buffer, save pointer */
|
/* copy entry name to end of buffer, save pointer */
|
||||||
int len = strlen((char *)entry->d_name);
|
len = strlen((char *)entry->d_name);
|
||||||
char *name = folder_alloc_from_end(len+1); /*for NULL*/
|
char *name = folder_alloc_from_end(len+1); /*for NULL*/
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -522,7 +522,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
MENUITEM_STRINGLIST(notquickscreen_able_option,
|
MENUITEM_STRINGLIST(notquickscreen_able_option,
|
||||||
ID2P(LANG_ONPLAY_MENU_TITLE), NULL,
|
ID2P(LANG_ONPLAY_MENU_TITLE), NULL,
|
||||||
ID2P(LANG_RESET_SETTING));
|
ID2P(LANG_RESET_SETTING));
|
||||||
const struct menu_item_ex *menu;
|
|
||||||
const struct settings_list *setting =
|
const struct settings_list *setting =
|
||||||
find_setting(temp->variable, NULL);
|
find_setting(temp->variable, NULL);
|
||||||
#ifdef HAVE_QUICKSCREEN
|
#ifdef HAVE_QUICKSCREEN
|
||||||
|
|
|
@ -549,8 +549,8 @@ int kbd_input(char* text, int buflen, unsigned short *kbd)
|
||||||
{
|
{
|
||||||
/* declare scoped pointers inside screen loops - hide the
|
/* declare scoped pointers inside screen loops - hide the
|
||||||
declarations from previous block level */
|
declarations from previous block level */
|
||||||
struct keyboard_parameters *pm = ¶m[l];
|
|
||||||
struct screen *sc = &screens[l];
|
struct screen *sc = &screens[l];
|
||||||
|
pm = ¶m[l];
|
||||||
sc->clear_display();
|
sc->clear_display();
|
||||||
kbd_draw_picker(pm, sc, &state);
|
kbd_draw_picker(pm, sc, &state);
|
||||||
kbd_draw_edit_line(pm, sc, &state);
|
kbd_draw_edit_line(pm, sc, &state);
|
||||||
|
|
|
@ -4333,7 +4333,7 @@ static bool load_tagcache(void)
|
||||||
unsigned int searchflag = auto_update ? DCS_STORAGE_PATH :
|
unsigned int searchflag = auto_update ? DCS_STORAGE_PATH :
|
||||||
DCS_CACHED_PATH;
|
DCS_CACHED_PATH;
|
||||||
|
|
||||||
int rc = dircache_search(searchflag | DCS_UPDATE_FILEREF,
|
rc = dircache_search(searchflag | DCS_UPDATE_FILEREF,
|
||||||
&tcrc_dcfrefs[idx_id], filename);
|
&tcrc_dcfrefs[idx_id], filename);
|
||||||
if (rc > 0) /* in cache and we have fileref */
|
if (rc > 0) /* in cache and we have fileref */
|
||||||
idx->flag |= FLAG_DIRCACHE;
|
idx->flag |= FLAG_DIRCACHE;
|
||||||
|
|
|
@ -215,11 +215,11 @@ static int move_callback(int handle, void* current, void* new)
|
||||||
/* loop over menus */
|
/* loop over menus */
|
||||||
for(int i = 0; i < menu_count; i++)
|
for(int i = 0; i < menu_count; i++)
|
||||||
{
|
{
|
||||||
struct menu_root* menu = menus[i];
|
struct menu_root* menuroot = menus[i];
|
||||||
/* then over the menu_entries of a menu */
|
/* then over the menu_entries of a menu */
|
||||||
for(int j = 0; j < menu->itemcount; j++)
|
for(int j = 0; j < menuroot->itemcount; j++)
|
||||||
{
|
{
|
||||||
struct menu_entry* mentry = menu->items[j];
|
struct menu_entry* mentry = menuroot->items[j];
|
||||||
/* then over the search_instructions of each menu_entry */
|
/* then over the search_instructions of each menu_entry */
|
||||||
for(int k = 0; k < mentry->si.tagorder_count; k++)
|
for(int k = 0; k < mentry->si.tagorder_count; k++)
|
||||||
{
|
{
|
||||||
|
@ -230,7 +230,7 @@ static int move_callback(int handle, void* current, void* new)
|
||||||
UPDATE(mentry->si.clause[k][l], diff);
|
UPDATE(mentry->si.clause[k][l], diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPDATE(menu->items[j], diff);
|
UPDATE(menuroot->items[j], diff);
|
||||||
}
|
}
|
||||||
UPDATE(menus[i], diff);
|
UPDATE(menus[i], diff);
|
||||||
}
|
}
|
||||||
|
|
|
@ -987,7 +987,7 @@ static int _talk_file(const char* filename,
|
||||||
return -1;
|
return -1;
|
||||||
if (talk_handle <= 0 || index_handle <= 0)
|
if (talk_handle <= 0 || index_handle <= 0)
|
||||||
{
|
{
|
||||||
int fd = open_voicefile();
|
fd = open_voicefile();
|
||||||
if (fd < 0 || !load_voicefile_index(fd))
|
if (fd < 0 || !load_voicefile_index(fd))
|
||||||
return load_voicefile_failure(fd);
|
return load_voicefile_failure(fd);
|
||||||
load_voicefile_data(fd);
|
load_voicefile_data(fd);
|
||||||
|
|
|
@ -242,6 +242,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
||||||
int x, int y, int width, int height)
|
int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
const unsigned char *ysrc, *usrc, *vsrc;
|
const unsigned char *ysrc, *usrc, *vsrc;
|
||||||
|
int cb, cr, rv, guv, bu, r, g, b;
|
||||||
|
|
||||||
int linecounter;
|
int linecounter;
|
||||||
fb_data *dst, *row_end;
|
fb_data *dst, *row_end;
|
||||||
long z;
|
long z;
|
||||||
|
@ -272,8 +274,6 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int y, cb, cr, rv, guv, bu, r, g, b;
|
|
||||||
|
|
||||||
y = YFAC*(*ysrc++ - 16);
|
y = YFAC*(*ysrc++ - 16);
|
||||||
cb = *usrc++ - 128;
|
cb = *usrc++ - 128;
|
||||||
cr = *vsrc++ - 128;
|
cr = *vsrc++ - 128;
|
||||||
|
@ -337,8 +337,6 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int y, cb, cr, rv, guv, bu, r, g, b;
|
|
||||||
|
|
||||||
y = YFAC*(*ysrc++ - 16);
|
y = YFAC*(*ysrc++ - 16);
|
||||||
cb = *usrc++ - 128;
|
cb = *usrc++ - 128;
|
||||||
cr = *vsrc++ - 128;
|
cr = *vsrc++ - 128;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue