freedreno/ir3: Avoid {0} initializer for struct reginfo
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 22 May 2020 21:30:54 +0000 (14:30 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Tue, 26 May 2020 19:46:18 +0000 (12:46 -0700)
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 <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>

src/freedreno/ir3/disasm-a3xx.c

index 6dd3da04924ba952737ef2c20c9e72b86371bb0c..d1e77b08913a050bb19da0f0bf3a329c3109426f 100644 (file)
@@ -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)