mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-13 05:10:42 +00:00
Try to silence more Coverity warnings
This commit is contained in:
parent
39778066dd
commit
3c7dc0a62e
@ -124,7 +124,7 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_x11_win)
|
||||
if (g_x11_win && g_x11_dpy)
|
||||
{
|
||||
/* Save last used monitor for later. */
|
||||
x11_save_last_used_monitor(DefaultRootWindow(g_x11_dpy));
|
||||
|
@ -507,11 +507,15 @@ enum retro_pixel_format rarch_softfilter_get_output_format(
|
||||
|
||||
void rarch_softfilter_process(rarch_softfilter_t *filt,
|
||||
void *output, size_t output_stride,
|
||||
const void *input, unsigned width, unsigned height, size_t input_stride)
|
||||
const void *input, unsigned width, unsigned height,
|
||||
size_t input_stride)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (filt && filt->impl && filt->impl->get_work_packets)
|
||||
if (!filt)
|
||||
return;
|
||||
|
||||
if (filt->impl && filt->impl->get_work_packets)
|
||||
filt->impl->get_work_packets(filt->impl_data, filt->packets,
|
||||
output, output_stride, input, width, height, input_stride);
|
||||
|
||||
|
@ -1251,6 +1251,7 @@ static int generic_action_ok_remap_file_save(const char *path,
|
||||
if (info)
|
||||
core_name = info->info.library_name;
|
||||
|
||||
if (!string_is_empty(core_name))
|
||||
fill_pathname_join(
|
||||
directory,
|
||||
settings->directory.input_remapping,
|
||||
@ -1733,11 +1734,13 @@ static void cb_generic_download(void *task_data,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!string_is_empty(dir_path))
|
||||
fill_pathname_join(output_path, dir_path,
|
||||
transf->path, sizeof(output_path));
|
||||
|
||||
/* Make sure the directory exists */
|
||||
path_basedir(output_path);
|
||||
|
||||
if (!path_mkdir(output_path))
|
||||
{
|
||||
err = "Failed to create the directory.";
|
||||
|
@ -1409,7 +1409,7 @@ static bool content_file_init(struct string_list *temporary_content)
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (!string_is_empty(global->subsystem) && system)
|
||||
if (!string_is_empty(global->subsystem))
|
||||
{
|
||||
special = init_content_file_subsystem(&ret, system);
|
||||
if (!ret)
|
||||
@ -1590,6 +1590,7 @@ static bool task_load_content(content_ctx_info_t *content_info,
|
||||
menu_display_set_msg_force(true);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_RENDER, NULL);
|
||||
|
||||
if (!string_is_empty(fullpath))
|
||||
fill_pathname_base(name, fullpath, sizeof(name));
|
||||
}
|
||||
#endif
|
||||
|
@ -95,6 +95,7 @@ static bool task_overlay_load_desc(
|
||||
bool normalized, float alpha_mod, float range_mod)
|
||||
{
|
||||
float width_mod, height_mod;
|
||||
float tmp_float;
|
||||
uint32_t box_hash, key_hash;
|
||||
bool tmp_bool = false;
|
||||
bool ret = true;
|
||||
@ -115,7 +116,8 @@ static bool task_overlay_load_desc(
|
||||
|
||||
snprintf(overlay_desc_normalized_key, sizeof(overlay_desc_normalized_key),
|
||||
"overlay%u_desc%u_normalized", ol_idx, desc_idx);
|
||||
config_get_bool(conf, overlay_desc_normalized_key, &normalized);
|
||||
if (config_get_bool(conf, overlay_desc_normalized_key, &tmp_bool))
|
||||
normalized = tmp_bool;
|
||||
|
||||
by_pixel = !normalized;
|
||||
|
||||
@ -243,8 +245,10 @@ static bool task_overlay_load_desc(
|
||||
snprintf(overlay_analog_saturate_key,
|
||||
sizeof(overlay_analog_saturate_key),
|
||||
"overlay%u_desc%u_saturate_pct", ol_idx, desc_idx);
|
||||
if (!config_get_float(conf, overlay_analog_saturate_key,
|
||||
&desc->analog_saturate_pct))
|
||||
if (config_get_float(conf, overlay_analog_saturate_key,
|
||||
&tmp_float))
|
||||
desc->analog_saturate_pct = tmp_float;
|
||||
else
|
||||
desc->analog_saturate_pct = 1.0f;
|
||||
}
|
||||
break;
|
||||
@ -265,12 +269,14 @@ static bool task_overlay_load_desc(
|
||||
snprintf(conf_key, sizeof(conf_key),
|
||||
"overlay%u_desc%u_alpha_mod", ol_idx, desc_idx);
|
||||
desc->alpha_mod = alpha_mod;
|
||||
config_get_float(conf, conf_key, &desc->alpha_mod);
|
||||
if (config_get_float(conf, conf_key, &tmp_float))
|
||||
desc->alpha_mod = tmp_float;
|
||||
|
||||
snprintf(conf_key, sizeof(conf_key),
|
||||
"overlay%u_desc%u_range_mod", ol_idx, desc_idx);
|
||||
desc->range_mod = range_mod;
|
||||
config_get_float(conf, conf_key, &desc->range_mod);
|
||||
if (config_get_float(conf, conf_key, &tmp_float))
|
||||
desc->range_mod = tmp_float;
|
||||
|
||||
snprintf(conf_key, sizeof(conf_key),
|
||||
"overlay%u_desc%u_movable", ol_idx, desc_idx);
|
||||
@ -430,7 +436,8 @@ static void task_overlay_deferred_load(retro_task_t *task)
|
||||
snprintf(overlay_full_screen_key, sizeof(overlay_full_screen_key),
|
||||
"overlay%u_full_screen", loader->pos);
|
||||
overlay->full_screen = false;
|
||||
config_get_bool(conf, overlay_full_screen_key, &overlay->full_screen);
|
||||
if (config_get_bool(conf, overlay_full_screen_key, &tmp_bool))
|
||||
overlay->full_screen = tmp_bool;
|
||||
|
||||
overlay->config.normalized = false;
|
||||
overlay->config.alpha_mod = 1.0f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user