gallium/auxiliary: Fix uses of gnu struct = {} extension

Most of these will never actually be compiled by windows, but in the
interest of being able to make using struct foo = {}; an error and
avoiding breaking windows removing a handful of safe uses seems like a
good trade off.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Dylan Baker
2019-11-21 09:50:27 -08:00
parent ed1ff99da7
commit 25e58e3718
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1816,7 +1816,7 @@ hud_create(struct cso_context *cso, struct hud_context *share)
#ifdef PIPE_OS_UNIX
unsigned signo = debug_get_num_option("GALLIUM_HUD_TOGGLE_SIGNAL", 0);
static boolean sig_handled = FALSE;
struct sigaction action = {};
struct sigaction action = {{0}};
#endif
huds_visible = debug_get_bool_option("GALLIUM_HUD_VISIBLE", TRUE);
@@ -55,7 +55,7 @@ void
renderonly_scanout_destroy(struct renderonly_scanout *scanout,
struct renderonly *ro)
{
struct drm_mode_destroy_dumb destroy_dumb = { };
struct drm_mode_destroy_dumb destroy_dumb = {0};
if (ro->kms_fd != -1) {
destroy_dumb.handle = scanout->handle;
@@ -76,7 +76,7 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
.height = rsc->height0,
.bpp = util_format_get_blocksizebits(rsc->format),
};
struct drm_mode_destroy_dumb destroy_dumb = { };
struct drm_mode_destroy_dumb destroy_dumb = {0};
scanout = CALLOC_STRUCT(renderonly_scanout);
if (!scanout)
+1 -1
View File
@@ -423,7 +423,7 @@ vl_bicubic_filter_render(struct vl_bicubic_filter *filter,
}
viewport.scale[2] = 1;
struct pipe_constant_buffer cb = {};
struct pipe_constant_buffer cb = {0};
float *ptr = NULL;
u_upload_alloc(filter->pipe->const_uploader, 0, 2 * sizeof(float), 256,
+3 -3
View File
@@ -588,7 +588,7 @@ cs_launch(struct vl_compositor *c,
struct pipe_context *ctx = c->pipe;
/* Bind the image */
struct pipe_image_view image = {};
struct pipe_image_view image = {0};
image.resource = c->fb_state.cbufs[0]->texture;
image.shader_access = image.access = PIPE_IMAGE_ACCESS_READ_WRITE;
image.format = c->fb_state.cbufs[0]->texture->format;
@@ -599,7 +599,7 @@ cs_launch(struct vl_compositor *c,
ctx->bind_compute_state(ctx, cs);
/* Dispatch compute */
struct pipe_grid_info info = {};
struct pipe_grid_info info = {0};
info.block[0] = 8;
info.block[1] = 8;
info.block[2] = 1;
@@ -741,7 +741,7 @@ vl_compositor_cs_create_shader(struct vl_compositor *c,
return NULL;
}
struct pipe_compute_state state = {};
struct pipe_compute_state state = {0};
state.ir_type = PIPE_SHADER_IR_TGSI;
state.prog = tokens;
+1 -1
View File
@@ -461,7 +461,7 @@ struct pipe_video_buffer *
vl_video_buffer_create_as_resource(struct pipe_context *pipe,
const struct pipe_video_buffer *tmpl)
{
struct pipe_resource templ, *resources[VL_NUM_COMPONENTS] = {};
struct pipe_resource templ, *resources[VL_NUM_COMPONENTS] = {0};
unsigned array_size = tmpl->interlaced ? 2 : 1;
memset(&templ, 0, sizeof(templ));