sim: cgen: tweak initializers to avoid warnings
authorMike Frysinger <vapier@gentoo.org>
Sun, 2 May 2021 02:03:05 +0000 (22:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 8 May 2021 16:10:27 +0000 (12:10 -0400)
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
sim/common/cgen-utils.c

index 17cf96450305367f935e1caa348e01186572fa06..0795a701c01a60a19e95bbf41e1160d056deb5f9 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-08  Mike Frysinger  <vapier@gentoo.org>
+
+       * cgen-utils.c (virtual_insn_entries): Change {0} to {}.
+
 2021-05-08  Mike Frysinger  <vapier@gentoo.org>
 
        * Make-common.in (html, clean-html, install-html, pdf, clean-pdf,
index 3d7c2821eaa268fdde8e19af9070dfd853c4e62c..a22caabbbd8ef42fe8cd0db65e3c64256f7c0876 100644 (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, {} }
   }
 };