mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Fix uninitialized scalar variable warnings
This commit is contained in:
parent
21bc56aa04
commit
3b83b6d030
@ -499,16 +499,14 @@ static void mui_render_label_value(mui_handle_t *mui,
|
||||
const char *value, float *pure_white)
|
||||
{
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
char label_str[PATH_MAX_LENGTH];
|
||||
char value_str[PATH_MAX_LENGTH];
|
||||
int value_len = strlen(value);
|
||||
int ticker_limit = 0;
|
||||
size_t usable_width = 0;
|
||||
uintptr_t texture_switch = 0;
|
||||
bool do_draw_text = false;
|
||||
uint32_t hash_value = 0;
|
||||
|
||||
usable_width = width - (mui->margin * 2);
|
||||
char label_str[PATH_MAX_LENGTH] = {0};
|
||||
char value_str[PATH_MAX_LENGTH] = {0};
|
||||
int value_len = strlen(value);
|
||||
int ticker_limit = 0;
|
||||
uintptr_t texture_switch = 0;
|
||||
bool do_draw_text = false;
|
||||
uint32_t hash_value = 0;
|
||||
size_t usable_width = width - (mui->margin * 2);
|
||||
|
||||
if (value_len * mui->glyph_width > usable_width / 2)
|
||||
value_len = (usable_width/2) / mui->glyph_width;
|
||||
@ -776,15 +774,15 @@ static void mui_frame(void *data)
|
||||
};
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
unsigned width, height, ticker_limit, i;
|
||||
char msg[256];
|
||||
char title[256];
|
||||
char title_buf[256];
|
||||
char title_msg[256];
|
||||
size_t selection;
|
||||
size_t title_margin;
|
||||
uint64_t *frame_count;
|
||||
menu_display_ctx_draw_t draw;
|
||||
mui_handle_t *mui = (mui_handle_t*)data;
|
||||
uint64_t *frame_count = NULL;
|
||||
char msg[256] = {0};
|
||||
char title[256] = {0};
|
||||
char title_buf[256] = {0};
|
||||
char title_msg[256] = {0};
|
||||
const uint32_t normal_color = 0x212121ff;
|
||||
const uint32_t hover_color = 0x212121ff;
|
||||
const uint32_t title_color = 0xffffffff;
|
||||
@ -938,10 +936,10 @@ static void mui_frame(void *data)
|
||||
/* Title */
|
||||
if (mui_get_core_title(title_msg, sizeof(title_msg)) == 0)
|
||||
{
|
||||
char title_buf_msg_tmp[256];
|
||||
char title_buf_msg[256];
|
||||
size_t usable_width = width - (mui->margin * 2);
|
||||
int ticker_limit, value_len;
|
||||
char title_buf_msg_tmp[256] = {0};
|
||||
char title_buf_msg[256] = {0};
|
||||
size_t usable_width = width - (mui->margin * 2);
|
||||
|
||||
snprintf(title_buf_msg, sizeof(title_buf), "%s (%s)",
|
||||
title_buf, title_msg);
|
||||
|
@ -416,9 +416,11 @@ static void rgui_render(void *data)
|
||||
size_t i, end, fb_pitch, old_start;
|
||||
unsigned fb_width, fb_height;
|
||||
int bottom;
|
||||
uint64_t *frame_count;
|
||||
char title[256], title_buf[256], title_msg[64];
|
||||
char msg[PATH_MAX_LENGTH];
|
||||
uint64_t *frame_count = NULL;
|
||||
char title[256] = {0};
|
||||
char title_buf[256] = {0};
|
||||
char title_msg[64] = {0};
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
|
||||
@ -563,7 +565,7 @@ static void rgui_render(void *data)
|
||||
if (settings->menu.timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
char timedate[PATH_MAX_LENGTH];
|
||||
char timedate[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
@ -586,13 +588,13 @@ static void rgui_render(void *data)
|
||||
{
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
size_t selection;
|
||||
char entry_path[PATH_MAX_LENGTH];
|
||||
char entry_value[PATH_MAX_LENGTH];
|
||||
char message[PATH_MAX_LENGTH];
|
||||
char entry_title_buf[PATH_MAX_LENGTH];
|
||||
char type_str_buf[PATH_MAX_LENGTH];
|
||||
unsigned entry_spacing = menu_entry_get_spacing(i);
|
||||
bool entry_selected = menu_entry_is_currently_selected(i);
|
||||
char entry_path[PATH_MAX_LENGTH] = {0};
|
||||
char entry_value[PATH_MAX_LENGTH] = {0};
|
||||
char message[PATH_MAX_LENGTH] = {0};
|
||||
char entry_title_buf[PATH_MAX_LENGTH] = {0};
|
||||
char type_str_buf[PATH_MAX_LENGTH] = {0};
|
||||
unsigned entry_spacing = menu_entry_get_spacing(i);
|
||||
bool entry_selected = menu_entry_is_currently_selected(i);
|
||||
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||
continue;
|
||||
@ -639,7 +641,8 @@ static void rgui_render(void *data)
|
||||
|
||||
if (display_kb)
|
||||
{
|
||||
const char *str = NULL, *label = NULL;
|
||||
const char *str = NULL;
|
||||
const char *label = NULL;
|
||||
menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_BUFF_PTR, &str);
|
||||
menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL, &label);
|
||||
|
||||
|
@ -1672,10 +1672,9 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
||||
for (; i < end; i++)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
char name[PATH_MAX_LENGTH];
|
||||
char value[PATH_MAX_LENGTH];
|
||||
float icon_x, icon_y;
|
||||
|
||||
char name[PATH_MAX_LENGTH] = {0};
|
||||
char value[PATH_MAX_LENGTH] = {0};
|
||||
const float half_size = xmb->icon.size / 2.0f;
|
||||
uintptr_t texture_switch = 0;
|
||||
uintptr_t icon = 0;
|
||||
@ -2026,9 +2025,10 @@ static void xmb_frame(void *data)
|
||||
size_t selection;
|
||||
math_matrix_4x4 mymat;
|
||||
unsigned i, width, height;
|
||||
char msg[PATH_MAX_LENGTH], title_msg[256];
|
||||
float item_color[16], coord_black[16], coord_white[16];
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
char title_msg[256] = {0};
|
||||
bool display_kb = false;
|
||||
bool render_background = false;
|
||||
file_list_t *selection_buf = NULL;
|
||||
@ -2121,7 +2121,7 @@ static void xmb_frame(void *data)
|
||||
if (settings->menu.timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
char timedate[256];
|
||||
char timedate[256] = {0};
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
@ -2241,7 +2241,8 @@ static void xmb_frame(void *data)
|
||||
|
||||
if (display_kb)
|
||||
{
|
||||
const char *str = NULL, *label = NULL;
|
||||
const char *str = NULL;
|
||||
const char *label = NULL;
|
||||
menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_BUFF_PTR, &str);
|
||||
menu_input_ctl(MENU_INPUT_CTL_KEYBOARD_LABEL, &label);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user