[Mesa-dev] [PATCH v2 29/29] gallium/aux/util/u_tests.c: Fix warnigns triggered -Wmissing-field-initializers
Brian Paul
brianp at vmware.com
Thu Nov 16 16:04:47 UTC 2017
In the subject "warnings"
I can fix that before pushing.
For the series, Reviewed-by: Brian Paul <brianp at vmware.com>
On 11/16/2017 08:10 AM, Gert Wollny wrote:
> * Use a designated initializer to silence the warning.
> * fix one intention that was using tabs instead of spaces
>
> Signed-off-by: Gert Wollny <ge.fossdev at gmail.com>
> ---
> src/gallium/auxiliary/util/u_tests.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c
> index 2548b464b3..34875da4af 100644
> --- a/src/gallium/auxiliary/util/u_tests.c
> +++ b/src/gallium/auxiliary/util/u_tests.c
> @@ -46,7 +46,7 @@ static struct pipe_resource *
> util_create_texture2d(struct pipe_screen *screen, unsigned width,
> unsigned height, enum pipe_format format)
> {
> - struct pipe_resource templ = {{0}};
> + struct pipe_resource templ = {.reference = {0}};
>
> templ.target = PIPE_TEXTURE_2D;
> templ.width0 = width;
> @@ -64,9 +64,9 @@ util_create_texture2d(struct pipe_screen *screen, unsigned width,
>
> static void
> util_set_framebuffer_cb0(struct cso_context *cso, struct pipe_context *ctx,
> - struct pipe_resource *tex)
> + struct pipe_resource *tex)
> {
> - struct pipe_surface templ = {{0}}, *surf;
> + struct pipe_surface templ = {.reference = {0}}, *surf;
> struct pipe_framebuffer_state fb = {0};
>
> templ.format = tex->format;
> @@ -93,7 +93,7 @@ util_set_blend_normal(struct cso_context *cso)
> static void
> util_set_dsa_disable(struct cso_context *cso)
> {
> - struct pipe_depth_stencil_alpha_state dsa = {{0}};
> + struct pipe_depth_stencil_alpha_state dsa = {.depth = {0}};
>
> cso_set_depth_stencil_alpha(cso, &dsa);
> }
>
More information about the mesa-dev
mailing list