Prevent some 'conditional jump or move depends on unitialised value' warnings

This commit is contained in:
twinaphex 2016-05-27 04:31:02 +02:00
parent 0d271b0ca7
commit a743c779f8
2 changed files with 10 additions and 9 deletions

View File

@ -634,14 +634,14 @@ static int action_ok_playlist_entry(const char *path,
(core_name_hash == MENU_VALUE_DETECT)
)
{
char new_core_path[PATH_MAX_LENGTH];
char new_display_name[PATH_MAX_LENGTH];
core_info_ctx_find_t core_info;
const char *entry_path = NULL;
const char *entry_crc32 = NULL;
const char *db_name = NULL;
const char *path_base = path_basename(menu->db_playlist_file);
bool found_associated_core = menu_playlist_find_associated_core(
char new_core_path[PATH_MAX_LENGTH] = {0};
char new_display_name[PATH_MAX_LENGTH] = {0};
const char *entry_path = NULL;
const char *entry_crc32 = NULL;
const char *db_name = NULL;
const char *path_base = path_basename(menu->db_playlist_file);
bool found_associated_core = menu_playlist_find_associated_core(
path_base, new_core_path, sizeof(new_core_path));
core_info.inf = NULL;

View File

@ -127,7 +127,7 @@ error:
**/
static bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info)
{
char new_core_path[PATH_MAX_LENGTH];
char new_core_path[PATH_MAX_LENGTH] = {0};
const core_info_t *info = NULL;
size_t supported = 0;
core_info_list_t *core_info = def_info ?
@ -141,7 +141,8 @@ static bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info
def_info->dir, def_info->path, def_info->len);
#ifdef HAVE_COMPRESSION
if (path_is_compressed_file(def_info->dir))
if ( !string_is_empty(def_info->dir)
&& path_is_compressed_file(def_info->dir))
{
/* In case of a compressed archive, we have to join with a hash */
/* We are going to write at the position of dir: */