From: Kristian H. Kristensen Date: Fri, 22 May 2020 21:30:54 +0000 (-0700) Subject: freedreno/ir3: Avoid {0} initializer for struct reginfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4e64e9f530c22e779ef5747c2a927bdd5b6c47d;p=mesa.git freedreno/ir3: Avoid {0} initializer for struct reginfo First element is not a scalar. Just initialize the struct like we do elsewhere. src/freedreno/ir3/disasm-a3xx.c:958:33: warning: suggest braces around initialization of subobject [-Wmissing-braces] Reviewed-by: Rob Clark Part-of: --- diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c index 6dd3da04924..d1e77b08913 100644 --- a/src/freedreno/ir3/disasm-a3xx.c +++ b/src/freedreno/ir3/disasm-a3xx.c @@ -955,9 +955,10 @@ static void print_instr_cat6_a3xx(struct disasm_ctx *ctx, instr_t *instr) /* note: dst might actually be a src (ie. address to store to) */ print_src(ctx, &dst); if (cat6->dst_off && cat6->g) { - struct reginfo dstoff_reg = {0}; - dstoff_reg.reg = (reg_t) cat6->c.off; - dstoff_reg.full = true; + struct reginfo dstoff_reg = { + .reg = (reg_t) cat6->c.off, + .full = true + }; fprintf(ctx->out, "+"); print_src(ctx, &dstoff_reg); } else if (dstoff)