Silence some more static code analysis warnings

This commit is contained in:
twinaphex 2019-01-11 01:35:18 +01:00
parent ccec13e64f
commit 13ccf4d408
9 changed files with 26 additions and 20 deletions

View File

@ -4174,12 +4174,13 @@ void netplay_refresh_rooms_menu(file_list_t *list)
static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const char *err)
{
char *new_data = NULL;
const char *path = NULL;
const char *label = NULL;
unsigned menu_type = 0;
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
menu_entries_get_last_stack(&path, &label, &menu_type, &enum_idx, NULL);
@ -4191,7 +4192,12 @@ static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const cha
if (!data || err)
goto finish;
data->data = (char*)realloc(data->data, data->len + 1);
new_data = (char*)realloc(data->data, data->len + 1);
if (!new_data)
goto finish;
data->data = new_data;
data->data[data->len] = '\0';
if (!strstr(data->data, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL)))

View File

@ -262,12 +262,12 @@ static bool menu_display_d3d10_font_init_first(
void** font_handle,
void* video_data,
const char* font_path,
float font_size,
float menu_font_size,
bool is_threaded)
{
font_data_t** handle = (font_data_t**)font_handle;
font_data_t* new_handle = font_driver_init_first(
video_data, font_path, font_size, true,
video_data, font_path, menu_font_size, true,
is_threaded, FONT_DRIVER_RENDER_D3D10_API);
if (!new_handle)
return false;

View File

@ -261,12 +261,12 @@ static bool menu_display_d3d11_font_init_first(
void** font_handle,
void* video_data,
const char* font_path,
float font_size,
float menu_font_size,
bool is_threaded)
{
font_data_t** handle = (font_data_t**)font_handle;
font_data_t* new_handle = font_driver_init_first(
video_data, font_path, font_size, true,
video_data, font_path, menu_font_size, true,
is_threaded, FONT_DRIVER_RENDER_D3D11_API);
if (!new_handle)
return false;

View File

@ -283,12 +283,12 @@ static bool menu_display_d3d12_font_init_first(
void** font_handle,
void* video_data,
const char* font_path,
float font_size,
float menu_font_size,
bool is_threaded)
{
font_data_t** handle = (font_data_t**)font_handle;
font_data_t* new_handle = font_driver_init_first(
video_data, font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D12_API);
video_data, font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D12_API);
if (!new_handle)
return false;
*handle = new_handle;

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro.
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -297,12 +297,12 @@ static void menu_display_d3d9_clear_color(
static bool menu_display_d3d9_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size,
const char *font_path, float menu_font_size,
bool is_threaded)
{
font_data_t **handle = (font_data_t**)font_handle;
if (!(*handle = font_driver_init_first(video_data,
font_path, font_size, true,
font_path, menu_font_size, true,
is_threaded,
FONT_DRIVER_RENDER_D3D9_API)))
return false;

View File

@ -238,12 +238,12 @@ static void menu_display_gl_clear_color(
static bool menu_display_gl_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size,
const char *font_path, float menu_font_size,
bool is_threaded)
{
font_data_t **handle = (font_data_t**)font_handle;
if (!(*handle = font_driver_init_first(video_data,
font_path, font_size, true,
font_path, menu_font_size, true,
is_threaded,
FONT_DRIVER_RENDER_OPENGL_API)))
return false;

View File

@ -64,7 +64,7 @@ static void menu_display_null_clear_color(
static bool menu_display_null_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size,
const char *font_path, float menu_font_size,
bool is_threaded)
{
return true;

View File

@ -332,11 +332,11 @@ static void menu_display_vk_blend_end(video_frame_info_t *video_info)
static bool menu_display_vk_font_init_first(
void **font_handle, void *video_data, const char *font_path,
float font_size, bool is_threaded)
float menu_font_size, bool is_threaded)
{
font_data_t **handle = (font_data_t**)font_handle;
*handle = font_driver_init_first(video_data,
font_path, font_size, true,
font_path, menu_font_size, true,
is_threaded,
FONT_DRIVER_RENDER_VULKAN_API);

View File

@ -473,7 +473,7 @@ bool menu_animation_push(menu_animation_ctx_entry_t *entry)
return true;
}
bool menu_animation_update(float delta_time)
bool menu_animation_update(float anim_delta_time)
{
unsigned i;
@ -482,8 +482,8 @@ bool menu_animation_update(float delta_time)
for(i = 0; i < da_count(anim.list); i++)
{
struct tween *tween = da_getptr(anim.list, i);
tween->running_since += delta_time;
struct tween *tween = da_getptr(anim.list, i);
tween->running_since += anim_delta_time;
*tween->subject = tween->easing(
tween->running_since,
@ -523,7 +523,7 @@ bool menu_animation_update(float delta_time)
da_clear(anim.pending);
}
anim.in_update = false;
anim.in_update = false;
animation_is_active = da_count(anim.list) > 0;
return animation_is_active;