glsl: Fix missing-braces warning.
authorVinson Lee <vlee@freedesktop.org>
Tue, 14 Feb 2017 01:52:59 +0000 (17:52 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 25 Feb 2017 00:04:06 +0000 (16:04 -0800)
  CXX    glsl/ast_to_hir.lo
glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)':
glsl/ast_to_hir.cpp:4846:42: warning: missing braces around initializer for 'unsigned int [16]' [-Wmissing-braces]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Andres Gomez <agomez@igalia.com>
src/compiler/glsl/ast_to_hir.cpp

index 88febe7ff3f140968ee2e2599a15590d33fdf97b..db48cf811342d749e69ec1e7dff1b464cf166589 100644 (file)
@@ -4849,7 +4849,7 @@ ast_declarator_list::hir(exec_list *instructions,
       if ((var->data.mode == ir_var_auto || var->data.mode == ir_var_temporary)
           && (var->type->is_numeric() || var->type->is_boolean())
           && state->zero_init) {
-         const ir_constant_data data = {0};
+         const ir_constant_data data = { { 0 } };
          var->data.has_initializer = true;
          var->constant_initializer = new(var) ir_constant(var->type, &data);
       }