X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=opcodes%2Fiq2000-opc.c;fp=opcodes%2Fiq2000-opc.c;h=faee07ac809b64044f1a6e1d40b9dd1d78ca2a9a;hp=c829c71811dad29f16a9ff2651792e8a1f21dba1;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/opcodes/iq2000-opc.c b/opcodes/iq2000-opc.c index c829c71..faee07a 100644 --- a/opcodes/iq2000-opc.c +++ b/opcodes/iq2000-opc.c @@ -2,7 +2,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2007 Free Software Foundation, Inc. +Copyright 1996-2009 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. @@ -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];