aboutsummaryrefslogtreecommitdiff
path: root/opcodes/fr30-opc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-02-18 17:13:04 +0000
committerNick Clifton <nickc@redhat.com>2009-02-18 17:13:04 +0000
commit137f2437e04f733cae1120d032c7a1b24aef54af (patch)
tree40ad037360c4c0f22a6ed569d5981774d3dee864 /opcodes/fr30-opc.c
parent90d8a22ca2f2b04b42c5049d54d32e54081b74b4 (diff)
downloadfsf-binutils-gdb-137f2437e04f733cae1120d032c7a1b24aef54af.zip
fsf-binutils-gdb-137f2437e04f733cae1120d032c7a1b24aef54af.tar.gz
fsf-binutils-gdb-137f2437e04f733cae1120d032c7a1b24aef54af.tar.bz2
* 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. * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning about calling memset with a zero length.
Diffstat (limited to 'opcodes/fr30-opc.c')
-rw-r--r--opcodes/fr30-opc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/opcodes/fr30-opc.c b/opcodes/fr30-opc.c
index ca80aaa..6d99258 100644
--- a/opcodes/fr30-opc.c
+++ b/opcodes/fr30-opc.c
@@ -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];