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.
This commit is contained in:
Mike Frysinger
2021-05-01 22:03:05 -04:00
parent 354c317ea4
commit aac7ce3c87
2 changed files with 10 additions and 6 deletions

View File

@@ -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, {} }
}
};