Prevent null pointer dereference / logically dead code / other misc. warnings

This commit is contained in:
twinaphex 2016-09-23 16:03:37 +02:00
parent baeadb775e
commit 4e3c9987f5
3 changed files with 58 additions and 53 deletions

View File

@ -3126,6 +3126,8 @@ bool config_save_overrides(int override_type)
RARCH_LOG("[overrides] looking for changed settings... \n");
if (conf)
{
for (i = 0; i < (unsigned)bool_settings_size; i++)
{
if ((*bool_settings[i].ptr) != (*bool_overrides[i].ptr))
@ -3162,6 +3164,7 @@ bool config_save_overrides(int override_type)
*float_overrides[i].ptr);
}
}
for (i = 0; i < (unsigned)array_settings_size; i++)
{
if (!string_is_equal(array_settings[i].ptr, array_overrides[i].ptr))
@ -3174,6 +3177,7 @@ bool config_save_overrides(int override_type)
array_overrides[i].ptr);
}
}
for (i = 0; i < (unsigned)path_settings_size; i++)
{
if (!string_is_equal(path_settings[i].ptr, path_overrides[i].ptr))
@ -3186,6 +3190,7 @@ bool config_save_overrides(int override_type)
path_overrides[i].ptr);
}
}
}
ret = false;

3
dirs.c
View File

@ -86,9 +86,6 @@ bool dir_free_shader(void)
struct rarch_dir_list *dir_list =
(struct rarch_dir_list*)&dir_shader_list;
if (!dir_list)
return false;
dir_list_free(dir_list->list);
dir_list->list = NULL;
dir_list->ptr = 0;

View File

@ -678,8 +678,11 @@ static bool init_content_file_set_attribs(
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
if (system)
{
attr.i = system->info.block_extract;
attr.i |= system->info.need_fullpath << 1;
}
attr.i |= (!content_does_not_need_content()) << 2;
if (!path_get_content(&fullpath)