Get rid of more implicit memsets

This commit is contained in:
twinaphex 2016-12-19 19:17:23 +01:00
parent 31b87594aa
commit 5ca7344436
3 changed files with 31 additions and 14 deletions

View File

@ -269,7 +269,7 @@ void x11_move_window(Display *dpy, Window win, int x, int y,
static void x11_set_window_class(Display *dpy, Window win)
{
XClassHint hint = {0};
XClassHint hint;
hint.res_name = (char*)"retroarch"; /* Broken header. */
hint.res_class = (char*)"retroarch";

View File

@ -123,22 +123,25 @@ static bool video_shader_parse_pass(config_file_t *conf,
char wrap_mode[64];
char frame_count_mod_buf[64];
char srgb_output_buf[64];
char fp_fbo_buf[64] = {0};
char mipmap_buf[64] = {0};
char alias_buf[64] = {0};
char scale_name_buf[64] = {0};
char attr_name_buf[64] = {0};
char scale_type[64] = {0};
char scale_type_x[64] = {0};
char scale_type_y[64] = {0};
char frame_count_mod[64] = {0};
char fp_fbo_buf[64];
char mipmap_buf[64];
char alias_buf[64];
char scale_name_buf[64];
char attr_name_buf[64];
char scale_type[64];
char scale_type_x[64];
char scale_type_y[64];
char frame_count_mod[64];
struct gfx_fbo_scale *scale = NULL;
bool tmp_bool = false;
float fattr = 0.0f;
int iattr = 0;
tmp_str[0] = shader_name[0] = filter_name_buf[0] =
wrap_name_buf[0] = wrap_mode[0] = frame_count_mod_buf[0] = '\0';
fp_fbo_buf[0] = mipmap_buf[0] = alias_buf[0] =
scale_name_buf[0] = attr_name_buf[0] = scale_type[0] =
scale_type_x[0] = scale_type_y[0] = frame_count_mod[0] =
tmp_str[0] = shader_name[0] = filter_name_buf[0] =
wrap_name_buf[0] = wrap_mode[0] = frame_count_mod_buf[0] = '\0';
srgb_output_buf[0] = '\0';
/* Source */

View File

@ -365,7 +365,14 @@ static bool video_thread_handle_packet(
case CMD_READ_VIEWPORT:
{
struct video_viewport vp = {0};
struct video_viewport vp;
vp.x = 0;
vp.y = 0;
vp.width = 0;
vp.height = 0;
vp.full_width = 0;
vp.full_height = 0;
thr->driver->viewport_info(thr->driver_data, &vp);
@ -587,11 +594,18 @@ static void video_thread_loop(void *data)
if (updated)
{
struct video_viewport vp;
bool ret = false;
bool alive = false;
bool focus = false;
bool has_windowed = true;
struct video_viewport vp = {0};
vp.x = 0;
vp.y = 0;
vp.width = 0;
vp.height = 0;
vp.full_width = 0;
vp.full_height = 0;
slock_lock(thr->frame.lock);