]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - opcodes/iq2000-opc.c
* fr30-opc.c: Regenerate.
[thirdparty/binutils-gdb.git] / opcodes / iq2000-opc.c
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];