This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas warning cleanups
- From: Ben Elliston <bje at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 12 Jun 2002 11:05:11 -0400 (EDT)
- Subject: gas warning cleanups
A number of warnings in gas have been giving me the willies, so I just
fixed some of them. A note about the ISSPACE change that Bruno Haible
made: I don't know how these two invocations were missed, but grep
indicates that they're all caught now.
Okay to commit?
2002-06-12 Ben Elliston <bje@redhat.com>
* input-file.c: Include "safe-ctype.h".
(input_file_open): Use ISSPACE, not isspace.
* symbols.c (resolve_symbol_value): Initialise final_val.
* subsegs.c (subsegs_print_statistics): Cast frchp to void *.
Index: input-file.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/input-file.c,v
retrieving revision 1.25
diff -u -p -r1.25 input-file.c
--- input-file.c 2001/09/26 20:40:27 1.25
+++ input-file.c 2002/06/12 15:02:02
@@ -28,6 +28,7 @@
#include <string.h>
#include "as.h"
+#include "safe-ctype.h"
#include "input-file.h"
static int input_file_get PARAMS ((char *, int));
@@ -159,7 +160,7 @@ input_file_open (filename, pre)
if (c == 'N')
{
fgets (buf, 80, f_in);
- if (!strncmp (buf, "O_APP", 5) && isspace (buf[5]))
+ if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
preprocess = 0;
if (!strchr (buf, '\n'))
ungetc ('#', f_in); /* It was longer. */
@@ -169,7 +170,7 @@ input_file_open (filename, pre)
else if (c == 'A')
{
fgets (buf, 80, f_in);
- if (!strncmp (buf, "PP", 2) && isspace (buf[2]))
+ if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
preprocess = 1;
if (!strchr (buf, '\n'))
ungetc ('#', f_in);
Index: subsegs.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/subsegs.c,v
retrieving revision 1.61
diff -u -p -r1.61 subsegs.c
--- subsegs.c 2001/08/11 18:27:01 1.61
+++ subsegs.c 2002/06/12 15:02:02
@@ -652,7 +652,7 @@ subsegs_print_statistics (file)
count++;
}
fprintf (file, "\n");
- fprintf (file, "\t%p %-10s\t%10d frags\n", frchp,
+ fprintf (file, "\t%p %-10s\t%10d frags\n", (void *) frchp,
segment_name (frchp->frch_seg), count);
}
}
Index: symbols.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/symbols.c,v
retrieving revision 1.138.2.3
diff -u -p -r1.138.2.3 symbols.c
--- symbols.c 2002/04/04 23:36:02 1.138.2.3
+++ symbols.c 2002/06/12 15:02:03
@@ -886,7 +886,7 @@ resolve_symbol_value (symp)
symbolS *symp;
{
int resolved;
- valueT final_val;
+ valueT final_val = 0;
segT final_seg;
#ifdef BFD_ASSEMBLER