This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[Patch] Reduce warnings in cgen-*.in
- To: cgen at sources dot redhat dot com
- Subject: [Patch] Reduce warnings in cgen-*.in
- From: Ben Elliston <bje at redhat dot com>
- Date: Thu, 22 Mar 2001 15:01:07 +1100 (EST)
- Cc: binutils at sources dot redhat dot com
FYI, I've just commited the following patch to eliminate unnecessary
warnings when building libopcodes.
2001-03-22 Ben Elliston <bje@redhat.com>
* cgen-asm.in (@arch@_cgen_assemble_insn): Move tmp_errmsg
declaration inside CGEN_VERBOSE_ASSEMBLER_ERRORS conditional.
* cgen-ibld.in (put_insn_int_value): Mark cd parameter as unused
to allay a compiler warning.
Index: cgen-asm.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-asm.in,v
retrieving revision 1.5
diff -u -r1.5 cgen-asm.in
--- cgen-asm.in 2001/03/13 22:58:34 1.5
+++ cgen-asm.in 2001/03/22 03:59:23
@@ -262,9 +262,9 @@
{
static char errbuf[150];
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
/* If requesting verbose error messages, use insert_errmsg.
Failing that, use parse_errmsg */
tmp_errmsg = (insert_errmsg ? insert_errmsg :
Index: cgen-ibld.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-ibld.in,v
retrieving revision 1.5
diff -u -r1.5 cgen-ibld.in
--- cgen-ibld.in 2001/03/13 22:58:34 1.5
+++ cgen-ibld.in 2001/03/22 03:59:24
@@ -265,7 +265,7 @@
static void
put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd;
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
CGEN_INSN_BYTES_PTR buf;
int length;
int insn_length;