From: Brian Paul Date: Thu, 11 Mar 2010 15:50:39 +0000 (-0700) Subject: svga: use memset() to initialize u to avoid warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25ba04c891ce959470d55a258243b5c105de8ff5;p=mesa.git svga: use memset() to initialize u to avoid warnings --- diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c index 705ca29e8f5..4ee1bf2c353 100644 --- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c +++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c @@ -360,7 +360,9 @@ dump_dstreg(struct sh_dstreg dstreg, union { struct sh_reg reg; struct sh_dstreg dstreg; - } u = { { 0 } }; + } u; + + memset(&u, 0, sizeof(u)); assert( (dstreg.modifier & (SVGA3DDSTMOD_SATURATE | SVGA3DDSTMOD_PARTIALPRECISION)) == dstreg.modifier );