X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=opcodes%2Fxc16x-opc.c;h=394f9a068faf50d029ae6285225969e75d53a0c3;hb=c7c7219d3a06a714e04e73ebd029811e6bd5bd37;hp=8352237656e05de0dd82e5a3b7c72853ca779eb9;hpb=01f0fe5e0450edf168c1f612feb93cf588e4e7ea;p=binutils-gdb.git diff --git a/opcodes/xc16x-opc.c b/opcodes/xc16x-opc.c index 8352237656e..394f9a068fa 100644 --- a/opcodes/xc16x-opc.c +++ b/opcodes/xc16x-opc.c @@ -2,23 +2,23 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2005 Free Software Foundation, Inc. +Copyright 1996-2007 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -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];