diff options
author | Alan Modra <amodra@gmail.com> | 2009-03-18 11:27:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-03-18 11:27:18 +0000 |
commit | 8d25cc3de0a2ca236b8a4a676535d05d2084c149 (patch) | |
tree | 63598b7fb4a9e31f97962dd7e21e8743664078dc /opcodes/openrisc-opc.c | |
parent | 5b1ba0e54600876c027f4a35362f37f8fae41219 (diff) | |
download | gdb-8d25cc3de0a2ca236b8a4a676535d05d2084c149.zip gdb-8d25cc3de0a2ca236b8a4a676535d05d2084c149.tar.gz gdb-8d25cc3de0a2ca236b8a4a676535d05d2084c149.tar.bz2 |
include/
* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
documentation.
bfd/
* elf32-m68hc1x.c: Include alloca-conf.h.
* xsym.c: Likewise.
* elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
* som.c: Likewise.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
binutils/
* sysdep.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
gas/
* as.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
opcodes/
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* openrisc-opc.c: Regenerate.
ld/
* ld.h: Remove alloca handling.
Diffstat (limited to 'opcodes/openrisc-opc.c')
-rw-r--r-- | opcodes/openrisc-opc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/opcodes/openrisc-opc.c b/opcodes/openrisc-opc.c index 9cfa8b9..c3aa09d 100644 --- a/opcodes/openrisc-opc.c +++ b/opcodes/openrisc-opc.c @@ -671,7 +671,10 @@ openrisc_cgen_init_opcode_table (CGEN_CPU_DESC cd) const CGEN_OPCODE *oc = & openrisc_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]; |