Silence some more code analysis warnings

This commit is contained in:
libretroadmin 2025-07-17 12:33:47 +02:00
parent 4c07e26649
commit dd480aac94
3 changed files with 11 additions and 12 deletions

View File

@ -1655,7 +1655,7 @@ void gfx_animation_deinit(void)
void gfx_animation_timer_start(float *timer, gfx_timer_ctx_entry_t *timer_entry) void gfx_animation_timer_start(float *timer, gfx_timer_ctx_entry_t *timer_entry)
{ {
gfx_animation_ctx_entry_t entry; gfx_animation_ctx_entry_t entry;
uintptr_t tag = (uintptr_t) timer; uintptr_t tag = (uintptr_t)timer;
gfx_animation_kill_by_tag(&tag); gfx_animation_kill_by_tag(&tag);

View File

@ -474,7 +474,6 @@ bool m3u_file_save(
{ {
size_t i; size_t i;
char base_dir[DIR_MAX_LENGTH]; char base_dir[DIR_MAX_LENGTH];
char *last_slash = NULL;
RFILE *file = NULL; RFILE *file = NULL;
if (!m3u_file || !m3u_file->entries) if (!m3u_file || !m3u_file->entries)
@ -485,7 +484,7 @@ bool m3u_file_save(
return false; return false;
/* Get M3U file base directory */ /* Get M3U file base directory */
if ((last_slash = find_last_slash(m3u_file->path))) if (find_last_slash(m3u_file->path))
fill_pathname_basedir(base_dir, m3u_file->path, sizeof(base_dir)); fill_pathname_basedir(base_dir, m3u_file->path, sizeof(base_dir));
else else
base_dir[0] = '\0'; base_dir[0] = '\0';

View File

@ -5100,10 +5100,6 @@ static void materialui_render_menu_entry_playlist_desktop(
int divider_y = entry_y + (int)node->entry_height; int divider_y = entry_y + (int)node->entry_height;
int entry_margin = (int)mui->margin; int entry_margin = (int)mui->margin;
int usable_width = node->entry_width - (int)(mui->margin * 2); int usable_width = node->entry_width - (int)(mui->margin * 2);
/* Entry label is drawn at the vertical centre
* of the current node */
int label_y = entry_y + (node->entry_height / 2.0f) +
mui->font_data.list.line_centre_offset;
bool draw_text_outside = (x_offset != 0); bool draw_text_outside = (x_offset != 0);
/* To prevent any ugly alignment issues, we /* To prevent any ugly alignment issues, we
* only draw a divider if its bottom edge is * only draw a divider if its bottom edge is
@ -5123,12 +5119,16 @@ static void materialui_render_menu_entry_playlist_desktop(
/* Draw entry label */ /* Draw entry label */
if (!string_is_empty(entry_label)) if (!string_is_empty(entry_label))
{ {
char label_buf[NAME_MAX_LENGTH];
label_buf[0] = '\0';
if (usable_width > 0) if (usable_width > 0)
{ {
char label_buf[NAME_MAX_LENGTH];
label_buf[0] = '\0';
/* Entry label is drawn at the vertical centre
* of the current node */
int label_y = entry_y + (node->entry_height / 2.0f) +
mui->font_data.list.line_centre_offset;
/* Apply ticker */ /* Apply ticker */
if (mui->flags & MUI_FLAG_USE_SMOOTH_TICKER) if (mui->flags & MUI_FLAG_USE_SMOOTH_TICKER)
{ {
@ -5157,7 +5157,7 @@ static void materialui_render_menu_entry_playlist_desktop(
label_y, label_y,
video_width, video_height, video_width, video_height,
(entry_selected || touch_feedback_active) ? (entry_selected || touch_feedback_active) ?
mui->colors.list_text_highlighted : mui->colors.list_text, mui->colors.list_text_highlighted : mui->colors.list_text,
TEXT_ALIGN_LEFT, 1.0f, false, 0.0f, TEXT_ALIGN_LEFT, 1.0f, false, 0.0f,
draw_text_outside); draw_text_outside);
} }