* readelf.c (slurp_ia64_unwind_table): Correct 64-bit unwind table
[deliverable/binutils-gdb.git] / opcodes / xc16x-opc.c
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];
This page took 0.022947 seconds and 4 git commands to generate.