From: Mike Frysinger Date: Sun, 2 May 2021 02:03:05 +0000 (-0400) Subject: sim: cgen: tweak initializers to avoid warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aac7ce3c8771f8db2fd0492a17fa45e85d449174;p=binutils-gdb.git 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. --- 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, {} } } };