* fr30-opc.c: Regenerate.
authorNick Clifton <nickc@redhat.com>
Wed, 18 Feb 2009 17:13:04 +0000 (17:13 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 18 Feb 2009 17:13:04 +0000 (17:13 +0000)
        * frv-opc.c: Regenerate.
        * ip2k-opc.c: Regenerate.
        * iq2000-opc.c: Regenerate.
        * lm32-opc.c: Regenerate.
        * m32c-opc.c: Regenerate.
        * m32r-opc.c: Regenerate.
        * mep-opc.c: Regenerate.
        * mt-opc.c: Regenerate.
        * xc16x-opc.c: Regenerate.
        * xstormy16-opc.c: Regenerate.
        * tic54x-dis.c (print_instruction): Avoid compiler warning on
        sprintf call.

        * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
        about calling memset with a zero length.

13 files changed:
opcodes/ChangeLog
opcodes/fr30-opc.c
opcodes/frv-opc.c
opcodes/ip2k-opc.c
opcodes/iq2000-opc.c
opcodes/lm32-opc.c
opcodes/m32c-opc.c
opcodes/m32r-opc.c
opcodes/mep-opc.c
opcodes/mt-opc.c
opcodes/tic54x-dis.c
opcodes/xc16x-opc.c
opcodes/xstormy16-opc.c

index 4332d4dbee58ff7e4a5ec55bef4e4649343cf301..941aff1ac654265d50509bbc15a74d6a7560e194 100644 (file)
@@ -1,3 +1,19 @@
+2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * fr30-opc.c: Regenerate.
+       * frv-opc.c: Regenerate.
+       * ip2k-opc.c: Regenerate.
+       * iq2000-opc.c: Regenerate.
+       * lm32-opc.c: Regenerate.
+       * m32c-opc.c: Regenerate.
+       * m32r-opc.c: Regenerate.
+       * mep-opc.c: Regenerate.
+       * mt-opc.c: Regenerate.
+       * xc16x-opc.c: Regenerate.
+       * xstormy16-opc.c: Regenerate.
+       * tic54x-dis.c (print_instruction): Avoid compiler warning on
+       sprintf call.
+
 2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
 
        * m68k-opc.c (m68k_opcodes): Add stldsr instruction.
index ca80aaadacbf0f93c03c02dc98b81b0076e7df7a..6d99258e09b4d4923c760e0262f7059b983e2664 100644 (file)
@@ -1361,7 +1361,10 @@ fr30_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & fr30_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index e474a0b006d1e6fa699c32dc369c7b7667afd828..f1a20e5572e4160830acb1c1d20c33626c56ddb4 100644 (file)
@@ -6223,7 +6223,10 @@ frv_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & frv_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 17a6aba082c598b2b0e3eca38d62de951b8daabb..080f5602506fb18c96eca1bb90d6b430dc9f5956 100644 (file)
@@ -892,7 +892,10 @@ ip2k_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & ip2k_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index c829c71811dad29f16a9ff2651792e8a1f21dba1..7d745f55cba8d6552f5ac48f48d34f7957d5b7c8 100644 (file)
@@ -3446,7 +3446,10 @@ iq2000_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & iq2000_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 1aee5bfa3f3e4fc52491beb4caec9faa140cc3c5..febfb8fb3fce56d70aa72e17f65aab0f6d59b6f5 100644 (file)
@@ -844,7 +844,10 @@ lm32_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & lm32_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 9497896a874449aadd2d42f4ba2d68fd30beda59..ff2a72a7eeae8c1c9b123635e28530bbc569f566 100644 (file)
@@ -80213,7 +80213,10 @@ m32c_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & m32c_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 807cba011ca2b5bc3aab07a15bf477d1c248149c..3455b1daefa8cf38cd4004b464cf039b3e12dd39 100644 (file)
@@ -1797,7 +1797,10 @@ m32r_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & m32r_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index fd832b09d210229cf8e1f381811ed31bf99388ca..aa25632b912baa035505ffb7245ce2baf470eeea 100644 (file)
@@ -2002,7 +2002,10 @@ mep_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & mep_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index f73ca2f7be5c83ca14a200bb07b9965e243468c8..f10d25bd745d020e6a1443a6ddcc9b772cddb552 100644 (file)
@@ -915,7 +915,10 @@ mt_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & mt_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 0b92f907fc55e9f2c9ec857eb5c249a0da395aee..0b6e7b479f3c03231d01197f8aeb05db7aa17547 100644 (file)
@@ -380,7 +380,10 @@ print_instruction (info, memaddr, opcode, tm_name, tm_operands, size, ext)
         case OP_CC3:
         {
           const char *code[] = { "eq", "lt", "gt", "neq" };
-          sprintf (operand[i], code[CC3 (opcode)]);
+
+         /* Do not use sprintf with only two parameters as a
+            compiler warning could be generated in such conditions.  */
+         sprintf (operand[i], "%s", code[CC3 (opcode)]);
           info->fprintf_func (info->stream, "%s%s", comma, operand[i]);
           break;
         }
index cc34b0c1d71799ff0b16f00dac842c345535d544..394f9a068faf50d029ae6285225969e75d53a0c3 100644 (file)
@@ -3041,7 +3041,10 @@ xc16x_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & xc16x_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 3ac3c2288fa7aacd271a1a00806dd6edeb324935..54b1d4125575dc6b4ea60165a56c436913eaf336 100644 (file)
@@ -1165,7 +1165,10 @@ xstormy16_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & xstormy16_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
This page took 0.100739 seconds and 4 git commands to generate.