Fix uninitialized scalar variables warnings

This commit is contained in:
twinaphex 2016-06-01 03:23:38 +02:00
parent ffdad57318
commit 9bb8c41ff6
4 changed files with 13 additions and 14 deletions

View File

@ -152,7 +152,7 @@ static int deferred_push_database_manager_list_deferred(
static int deferred_push_cursor_manager_list_deferred( static int deferred_push_cursor_manager_list_deferred(
menu_displaylist_info_t *info) menu_displaylist_info_t *info)
{ {
char rdb_path[PATH_MAX_LENGTH]; char rdb_path[PATH_MAX_LENGTH] = {0};
int ret = -1; int ret = -1;
char *query = NULL; char *query = NULL;
char *rdb = NULL; char *rdb = NULL;

View File

@ -114,9 +114,9 @@ int generic_action_ok_displaylist_push(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx, const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned action_type) unsigned action_type)
{ {
char tmp[PATH_MAX_LENGTH];
char action_path[PATH_MAX_LENGTH];
enum menu_displaylist_ctl_state dl_type = DISPLAYLIST_GENERIC; enum menu_displaylist_ctl_state dl_type = DISPLAYLIST_GENERIC;
char tmp[PATH_MAX_LENGTH] = {0};
char action_path[PATH_MAX_LENGTH] = {0};
menu_displaylist_info_t info = {0}; menu_displaylist_info_t info = {0};
const char *menu_label = NULL; const char *menu_label = NULL;
const char *menu_path = NULL; const char *menu_path = NULL;
@ -725,7 +725,7 @@ static int generic_action_ok(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx, const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned id, unsigned flush_id) unsigned id, unsigned flush_id)
{ {
char action_path[PATH_MAX_LENGTH]; char action_path[PATH_MAX_LENGTH] = {0};
unsigned flush_type = 0; unsigned flush_type = 0;
int ret = 0; int ret = 0;
const char *menu_path = NULL; const char *menu_path = NULL;
@ -1011,8 +1011,8 @@ static int generic_action_ok_remap_file_save(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx, const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned action_type) unsigned action_type)
{ {
char directory[PATH_MAX_LENGTH]; char directory[PATH_MAX_LENGTH] = {0};
char file[PATH_MAX_LENGTH]; char file[PATH_MAX_LENGTH] = {0};
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
rarch_system_info_t *info = NULL; rarch_system_info_t *info = NULL;
@ -1323,8 +1323,8 @@ static void cb_decompressed(void *task_data, void *user_data, const char *err)
static void cb_generic_download(void *task_data, static void cb_generic_download(void *task_data,
void *user_data, const char *err) void *user_data, const char *err)
{ {
char output_path[PATH_MAX_LENGTH]; char output_path[PATH_MAX_LENGTH] = {0};
char shaderdir[PATH_MAX_LENGTH]; char shaderdir[PATH_MAX_LENGTH] = {0};
const char *file_ext = NULL; const char *file_ext = NULL;
const char *dir_path = NULL; const char *dir_path = NULL;
menu_file_transfer_t *transf = (menu_file_transfer_t*)user_data; menu_file_transfer_t *transf = (menu_file_transfer_t*)user_data;

View File

@ -169,12 +169,11 @@ static enum zarch_layout_type zarch_layout;
static void zarch_zui_font(void) static void zarch_zui_font(void)
{ {
int font_size;
char mediapath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH];
menu_display_ctx_font_t font_info; menu_display_ctx_font_t font_info;
settings_t *settings = config_get_ptr(); char mediapath[PATH_MAX_LENGTH] = {0};
char fontpath[PATH_MAX_LENGTH] = {0};
font_size = menu_display_get_font_size(); settings_t *settings = config_get_ptr();
int font_size = menu_display_get_font_size();
fill_pathname_join( fill_pathname_join(
mediapath, mediapath,

View File

@ -61,7 +61,7 @@ static bool screenshot_dump(
unsigned height, unsigned height,
int pitch, bool bgr24) int pitch, bool bgr24)
{ {
char filename[PATH_MAX_LENGTH]; char filename[PATH_MAX_LENGTH] = {0};
char shotname[256] = {0}; char shotname[256] = {0};
bool ret = false; bool ret = false;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();