sim: cgen: tweak initializers to avoid warnings
[deliverable/binutils-gdb.git] / sim / common / cgen-utils.c
index d17fb42ce1c84d88541e48b143a8a50144bd4a61..a22caabbbd8ef42fe8cd0db65e3c64256f7c0876 100644 (file)
@@ -1,5 +1,5 @@
 /* Support code for various pieces of CGEN simulators.
-   Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   Copyright (C) 1996-2021 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -28,7 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define SEMOPS_DEFINE_INLINE
 #include "cgen-ops.h"
 
-const char *mode_names[] = {
+const char * const mode_names[] = {
   "VOID",
   "BI",
   "QI",
@@ -56,22 +56,22 @@ const char *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, {} }
   }
 };
 
@@ -319,9 +319,7 @@ CONVDISI (val)
 #endif /* DI_FN_SUPPORT */
 \f
 QI
-RORQI (val, shift)
-     QI  val;
-     int shift;
+RORQI (QI val, int shift)
 {
   if (shift != 0)
     {
@@ -336,9 +334,7 @@ RORQI (val, shift)
 }
 
 QI
-ROLQI (val, shift)
-     QI  val;
-     int shift;
+ROLQI (QI val, int shift)
 {
   if (shift != 0)
     {
@@ -353,9 +349,7 @@ ROLQI (val, shift)
 }
 
 HI
-RORHI (val, shift)
-     HI  val;
-     int shift;
+RORHI (HI val, int shift)
 {
   if (shift != 0)
     {
@@ -370,9 +364,7 @@ RORHI (val, shift)
 }
 
 HI
-ROLHI (val, shift)
-     HI  val;
-     int shift;
+ROLHI (HI val, int shift)
 {
   if (shift != 0)
     {
@@ -387,9 +379,7 @@ ROLHI (val, shift)
 }
 
 SI
-RORSI (val, shift)
-     SI  val;
-     int shift;
+RORSI (SI val, int shift)
 {
   if (shift != 0)
     {
@@ -404,9 +394,7 @@ RORSI (val, shift)
 }
 
 SI
-ROLSI (val, shift)
-     SI  val;
-     int shift;
+ROLSI (SI val, int shift)
 {
   if (shift != 0)
     {
This page took 0.025732 seconds and 4 git commands to generate.