Try to fix 'pointer to local outside scope' warning

This commit is contained in:
twinaphex 2016-09-25 05:32:16 +02:00
parent 8025110f07
commit 3e182461d9
1 changed files with 23 additions and 26 deletions

View File

@ -175,6 +175,7 @@ int generic_action_ok_displaylist_push(const char *path,
unsigned action_type) unsigned action_type)
{ {
enum menu_displaylist_ctl_state dl_type = DISPLAYLIST_NONE; enum menu_displaylist_ctl_state dl_type = DISPLAYLIST_NONE;
char new_path_tmp[PATH_MAX_LENGTH] = {0};
char tmp[PATH_MAX_LENGTH] = {0}; char tmp[PATH_MAX_LENGTH] = {0};
char parent_dir[PATH_MAX_LENGTH] = {0}; char parent_dir[PATH_MAX_LENGTH] = {0};
char action_path[PATH_MAX_LENGTH] = {0}; char action_path[PATH_MAX_LENGTH] = {0};
@ -509,19 +510,15 @@ int generic_action_ok_displaylist_push(const char *path,
dl_type = DISPLAYLIST_PENDING_CLEAR; dl_type = DISPLAYLIST_PENDING_CLEAR;
break; break;
case ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST: case ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST:
{ fill_pathname_join_delim(new_path_tmp, path, label, ';',
char new_path[PATH_MAX_LENGTH] = {0}; sizeof(new_path_tmp));
fill_pathname_join_delim(new_path, path, label, ';',
sizeof(new_path));
info.type = type; info.type = type;
info.directory_ptr = idx; info.directory_ptr = idx;
info_path = new_path; info_path = new_path_tmp;
info_label = msg_hash_to_str( info_label = msg_hash_to_str(
MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST); MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST; info.enum_idx = MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST;
dl_type = DISPLAYLIST_GENERIC; dl_type = DISPLAYLIST_GENERIC;
}
break; break;
case ACTION_OK_DL_CORE_CONTENT_DIRS_LIST: case ACTION_OK_DL_CORE_CONTENT_DIRS_LIST:
info.type = type; info.type = type;