[Mesa-dev] [PATCH] st/mesa: silence missing braces warning in st_program.c

Brian Paul brianp at vmware.com
Mon Aug 1 15:57:20 UTC 2016


Silence a gcc warning:
state_tracker/st_program.c: In function 'st_create_fp_variant':
state_tracker/st_program.c:957:10: warning: missing braces around initializer [-Wmissing-braces]
          nir_lower_drawpixels_options options = {0};
          ^
state_tracker/st_program.c:957:10: warning: (near initialization for 'options.texcoord_state_tokens') [-Wmissing-braces]
---
 src/mesa/state_tracker/st_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index ebeed14..e297bb1 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -954,7 +954,7 @@ st_create_fp_variant(struct st_context *st,
 
       /* glDrawPixels (color only) */
       if (key->drawpixels) {
-         nir_lower_drawpixels_options options = {0};
+         nir_lower_drawpixels_options options = {{0}};
          unsigned samplers_used = stfp->Base.Base.SamplersUsed;
 
          /* Find the first unused slot. */
-- 
1.9.1



More information about the mesa-dev mailing list