From 01d80bed1f639ed98f09107206ebe36899d3c852 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 8 Jan 2017 09:02:38 -0800 Subject: [PATCH] nir: Fix anonymous union initialization with older GCC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix this build error with GCC 4.4.7. CC nir/nir_opt_copy_prop_vars.lo nir/nir_opt_copy_prop_vars.c: In function ‘copy_prop_vars_block’: nir/nir_opt_copy_prop_vars.c:765: error: unknown field ‘deref’ specified in initializer nir/nir_opt_copy_prop_vars.c:765: warning: missing braces around initializer nir/nir_opt_copy_prop_vars.c:765: warning: (near initialization for ‘(anonymous).’) nir/nir_opt_copy_prop_vars.c:765: warning: initialization from incompatible pointer type Fixes: 62332d139c8f ("nir: Add a local variable-based copy propagation pass") Signed-off-by: Vinson Lee Acked-by: Jason Ekstrand --- src/compiler/nir/nir_opt_copy_prop_vars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index 8c24cd7f915..7f17469f641 100644 --- a/src/compiler/nir/nir_opt_copy_prop_vars.c +++ b/src/compiler/nir/nir_opt_copy_prop_vars.c @@ -762,7 +762,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state, } else { value = (struct value) { .is_ssa = false, - .deref = src, + { .deref = src }, }; } -- 2.30.2