This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas warning fixes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 27 Aug 2002 20:36:53 +0930
- Subject: gas warning fixes
Applying mainline. Warning fixes, and a small improvement to folding
of expressions involving subtractions.
gas/ChangeLog
* dwarf2dbg.c: Always include dwarf2dbg.h.
(dwarf2_directive_file): Adjust dummy version args.
* ecoff.c (ecoff_directive_weakext): Add ATTRIBUTE_UNUSED.
* expr.c (clean_up_expression <O_subtract>): Allow subtraction
when symbol values differ.
* read.c (do_align): Add ATTRIBUTE_UNUSED to label.
(pseudo_set <O_subtract>): Remove unnecessary segment test.
* config/obj-bout.c (obj_pseudo_table): Warning fix.
Index: gas/dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.52
diff -u -p -r1.52 dwarf2dbg.c
--- gas/dwarf2dbg.c 1 Aug 2002 15:04:41 -0000 1.52
+++ gas/dwarf2dbg.c 27 Aug 2002 10:41:48 -0000
@@ -41,9 +41,10 @@
#endif
#endif
+#include "dwarf2dbg.h"
+
#ifdef BFD_ASSEMBLER
-#include "dwarf2dbg.h"
#include "subsegs.h"
#include "elf/dwarf2.h"
@@ -1340,11 +1341,12 @@ dwarf2_emit_insn (size)
{
}
-void
+char *
dwarf2_directive_file (dummy)
int dummy ATTRIBUTE_UNUSED;
{
s_app_file (0);
+ return NULL;
}
void
Index: gas/ecoff.c
===================================================================
RCS file: /cvs/src/src/gas/ecoff.c,v
retrieving revision 1.14
diff -u -p -r1.14 ecoff.c
--- gas/ecoff.c 26 Jun 2002 01:18:42 -0000 1.14
+++ gas/ecoff.c 27 Aug 2002 09:27:15 -0000
@@ -3376,7 +3376,7 @@ mark_stabs (ignore)
/* For TC_MIPS use the version in tc-mips.c. */
void
ecoff_directive_weakext (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
Index: gas/expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.42
diff -u -p -r1.42 expr.c
--- gas/expr.c 18 May 2002 12:53:30 -0000 1.42
+++ gas/expr.c 27 Aug 2002 09:27:17 -0000
@@ -1,6 +1,6 @@
/* expr.c -operands, expressions-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001
+ 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1375,9 +1375,7 @@ clean_up_expression (expressionP)
if (expressionP->X_op_symbol == expressionP->X_add_symbol
|| ((symbol_get_frag (expressionP->X_op_symbol)
== symbol_get_frag (expressionP->X_add_symbol))
- && SEG_NORMAL (S_GET_SEGMENT (expressionP->X_add_symbol))
- && (S_GET_VALUE (expressionP->X_op_symbol)
- == S_GET_VALUE (expressionP->X_add_symbol))))
+ && SEG_NORMAL (S_GET_SEGMENT (expressionP->X_add_symbol))))
{
addressT diff = (S_GET_VALUE (expressionP->X_add_symbol)
- S_GET_VALUE (expressionP->X_op_symbol));
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.53
diff -u -p -r1.53 read.c
--- gas/read.c 14 Aug 2002 16:38:14 -0000 1.53
+++ gas/read.c 27 Aug 2002 10:41:51 -0000
@@ -1,6 +1,6 @@
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1197,7 +1197,7 @@ do_align (n, fill, len, max)
}
#ifdef md_do_align
- just_record_alignment:
+ just_record_alignment: ATTRIBUTE_UNUSED
#endif
record_alignment (now_seg, n - OCTETS_PER_BYTE_POWER);
@@ -3232,8 +3232,6 @@ pseudo_set (symbolP)
as_bad (_("floating point number invalid"));
}
else if (exp.X_op == O_subtract
- && (S_GET_SEGMENT (exp.X_add_symbol)
- == S_GET_SEGMENT (exp.X_op_symbol))
&& SEG_NORMAL (S_GET_SEGMENT (exp.X_add_symbol))
&& (symbol_get_frag (exp.X_add_symbol)
== symbol_get_frag (exp.X_op_symbol)))
Index: gas/config/obj-bout.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-bout.c,v
retrieving revision 1.8
diff -u -p -r1.8 obj-bout.c
--- gas/config/obj-bout.c 22 May 2001 10:23:49 -0000 1.8
+++ gas/config/obj-bout.c 27 Aug 2002 09:27:24 -0000
@@ -78,7 +78,7 @@ const pseudo_typeS obj_pseudo_table[] =
{"ABORT", s_ignore, 0},
{"ident", s_ignore, 0},
- {NULL} /* End sentinel. */
+ {NULL, NULL, 0} /* End sentinel. */
};
/* Relocation. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre