1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-05 09:48:42 +00:00

Fix uninitialized scalar variable warnings

This commit is contained in:
twinaphex 2016-05-26 17:32:27 +02:00
parent 0f954fd4c8
commit 4f98cf05f4
5 changed files with 25 additions and 26 deletions

View File

@ -161,9 +161,9 @@ static void core_info_list_free(core_info_list_t *core_info_list)
static config_file_t *core_info_list_iterate(
struct string_list *contents, size_t i)
{
char info_path_base[PATH_MAX_LENGTH];
char info_path[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
char info_path_base[PATH_MAX_LENGTH] = {0};
char info_path[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
if (!contents->elems[i].data)
return NULL;

View File

@ -464,15 +464,15 @@ int libretrodb_create_index(libretrodb_t *db,
struct node_iter_ctx nictx;
struct rmsgpack_dom_value key;
libretrodb_index_t idx;
struct rmsgpack_dom_value item;
struct rmsgpack_dom_value *field;
uint64_t idx_header_offset;
libretrodb_cursor_t cur = {0};
void *buff = NULL;
uint64_t *buff_u64 = NULL;
uint8_t field_size = 0;
uint64_t item_loc = libretrodb_tell(db);
bintree_t *tree = bintree_new(node_compare, &field_size);
struct rmsgpack_dom_value item = {0};
libretrodb_cursor_t cur = {0};
struct rmsgpack_dom_value *field = NULL;
void *buff = NULL;
uint64_t *buff_u64 = NULL;
uint8_t field_size = 0;
uint64_t item_loc = libretrodb_tell(db);
bintree_t *tree = bintree_new(node_compare, &field_size);
if (!tree || (libretrodb_cursor_open(db, &cur, NULL) != 0))
goto clean;

View File

@ -215,7 +215,8 @@ static void mui_draw_tab(mui_handle_t *mui,
unsigned width, unsigned height,
float *pure_white)
{
unsigned tab_icon;
unsigned tab_icon = 0;
switch (i)
{
case MUI_SYSTEM_TAB_MAIN:
@ -996,12 +997,11 @@ static void mui_frame(void *data)
static void mui_font(void)
{
int font_size;
char mediapath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH];
menu_display_ctx_font_t font_info;
settings_t *settings = config_get_ptr();
font_size = menu_display_get_font_size();
char mediapath[PATH_MAX_LENGTH] = {0};
char fontpath[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
int font_size = menu_display_get_font_size();
fill_pathname_join(mediapath, settings->directory.assets,
"glui", sizeof(mediapath));

View File

@ -2283,13 +2283,12 @@ static void xmb_frame(void *data)
static void xmb_font(xmb_handle_t *xmb)
{
int font_size;
char mediapath[PATH_MAX_LENGTH],
themepath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH];
menu_display_ctx_font_t font_info;
settings_t *settings = config_get_ptr();
font_size = menu_display_get_font_size();
char mediapath[PATH_MAX_LENGTH] = {0};
char themepath[PATH_MAX_LENGTH] = {0};
char fontpath[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
int font_size = menu_display_get_font_size();
fill_pathname_join(
mediapath,

View File

@ -1072,12 +1072,12 @@ static bool load_content_from_compressed_archive(
bool need_fullpath, const char *path)
{
union string_list_elem_attr attributes;
char new_path[PATH_MAX_LENGTH];
char new_basedir[PATH_MAX_LENGTH];
char new_path[PATH_MAX_LENGTH] = {0};
char new_basedir[PATH_MAX_LENGTH] = {0};
ssize_t new_path_len = 0;
bool ret = false;
settings_t *settings = config_get_ptr();
rarch_system_info_t *sys_info= NULL;
settings_t *settings = config_get_ptr();
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &sys_info);