From aac7ce3c8771f8db2fd0492a17fa45e85d449174 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 22:03:05 -0400 Subject: [PATCH] sim: cgen: tweak initializers to avoid warnings Use {} instead of {0} to avoid warnings: common/cgen-utils.c:59:1: warning: missing braces around initializer [-Wmissing-braces] 59 | { | ^ 60 | { 61 | VIRTUAL_INSN_X_INVALID, "--invalid--", NULL, 0, { V, { 0 } } | {{}} Generated code should be the same. --- sim/common/ChangeLog | 4 ++++ sim/common/cgen-utils.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 17cf9645030..0795a701c01 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2021-05-08 Mike Frysinger + + * cgen-utils.c (virtual_insn_entries): Change {0} to {}. + 2021-05-08 Mike Frysinger * Make-common.in (html, clean-html, install-html, pdf, clean-pdf, diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c index 3d7c2821eaa..a22caabbbd8 100644 --- a/sim/common/cgen-utils.c +++ b/sim/common/cgen-utils.c @@ -56,22 +56,22 @@ const char * const mode_names[] = { static const CGEN_IBASE virtual_insn_entries[] = { { - VIRTUAL_INSN_X_INVALID, "--invalid--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_INVALID, "--invalid--", NULL, 0, { V, {} } }, { - VIRTUAL_INSN_X_BEFORE, "--before--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_BEFORE, "--before--", NULL, 0, { V, {} } }, { - VIRTUAL_INSN_X_AFTER, "--after--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_AFTER, "--after--", NULL, 0, { V, {} } }, { - VIRTUAL_INSN_X_BEGIN, "--begin--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_BEGIN, "--begin--", NULL, 0, { V, {} } }, { - VIRTUAL_INSN_X_CHAIN, "--chain--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_CHAIN, "--chain--", NULL, 0, { V, {} } }, { - VIRTUAL_INSN_X_CTI_CHAIN, "--cti-chain--", NULL, 0, { V, { 0 } } + VIRTUAL_INSN_X_CTI_CHAIN, "--cti-chain--", NULL, 0, { V, {} } } }; -- 2.30.2