1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Silence some static code analysis warnings

This commit is contained in:
twinaphex 2017-10-11 21:46:18 +02:00
parent cadc4f56a3
commit 7cf1793801
3 changed files with 5 additions and 3 deletions

View File

@ -1024,7 +1024,7 @@ static void command_event_init_controllers(void)
/* Ideally these checks shouldn't be required but if we always
* call core_set_controller_port_device input won't work on
* cores that don't set port information properly */
if (info->ports.size != 0 && i < info->ports.size)
if (info && info->ports.size != 0 && i < info->ports.size)
set_controller = true;
break;
default:

View File

@ -179,8 +179,9 @@ static bool append_plugs(retro_dsp_filter_t *dsp, struct string_list *list)
{
unsigned i;
dspfilter_simd_mask_t mask = cpu_features_get();
unsigned list_size = list ? list->size : 0;
for (i = 0; i < list->size; i++)
for (i = 0; i < list_size; i++)
{
dspfilter_get_implementation_t cb;
const struct dspfilter_implementation *impl = NULL;

View File

@ -131,7 +131,8 @@ static bool resampler_append_plugs(void **re,
{
resampler_simd_mask_t mask = (resampler_simd_mask_t)cpu_features_get();
*re = (*backend)->init(&resampler_config, bw_ratio, mask);
if (*backend)
*re = (*backend)->init(&resampler_config, bw_ratio, mask);
if (!*re)
return false;