* [PATCH] Silence compiler warnings
@ 2001-10-05 16:04 Thiemo Seufer
0 siblings, 0 replies; only message in thread
From: Thiemo Seufer @ 2001-10-05 16:04 UTC (permalink / raw)
To: binutils
Hi All,
this silences some of the compiler warnings I get. I don't know
if defining a prototype for main() is the right solution. This
is already used in gas/as.c, but I assume the compiler should
know about main() as a special function. I don't have a C standard
available ATM to reassure.
Thiemo
2001-10-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/binutils/ChangeLog
* addr2line.c (main): Add prototype.
* ar.c (main): Likewise.
* arlex.l (YY_NO_UNPUT): Define.
(yylex): New Prototype.
* arsup.h (yylex): New Prototype.
* bucomm.c (make_tempname): Use mkstemp instead of mktemp.
* nm.c (main): Add prototype.
* objcopy.c (main): Likewise.
* objdump.c (main): Likewise.
* size.c (main): Likewise.
* strings.c (main): Likewise.
(get_char): Initialize Variable.
/gas/ChangeLog
* gasp.c (main): Add prototype.
* input-file: Include ctype.h for isspace.
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/addr2line.c src/binutils/addr2line.c
--- src-orig/binutils/addr2line.c Wed Oct 3 01:35:08 2001
+++ src/binutils/addr2line.c Fri Oct 5 23:32:04 2001
@@ -263,6 +263,8 @@ process_file (filename, target)
bfd_close (abfd);
}
\f
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/ar.c src/binutils/ar.c
--- src-orig/binutils/ar.c Wed Oct 3 01:35:08 2001
+++ src/binutils/ar.c Fri Oct 5 23:31:12 2001
@@ -358,6 +358,8 @@ remove_output ()
/* The option parsing should be in its own function.
It will be when I have getopt working. */
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/arlex.l src/binutils/arlex.l
--- src-orig/binutils/arlex.l Wed Mar 14 17:02:30 2001
+++ src/binutils/arlex.l Sat Oct 6 00:30:33 2001
@@ -29,6 +29,10 @@ Foundation, Inc., 59 Temple Place - Suit
#include "libiberty.h"
#include "arparse.h"
+#define YY_NO_UNPUT
+
+extern int yylex PARAMS ((void));
+
int linenumber;
%}
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/arsup.h src/binutils/arsup.h
--- src-orig/binutils/arsup.h Wed Mar 14 17:02:30 2001
+++ src/binutils/arsup.h Sat Oct 6 00:01:29 2001
@@ -64,6 +64,9 @@ ar_extract PARAMS ((struct list *));
bfd *
open_inarch PARAMS ((const char *archive_filename, const char *));
+extern int
+yylex PARAMS ((void));
+
int
yyparse PARAMS ((void));
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/bucomm.c src/binutils/bucomm.c
--- src-orig/binutils/bucomm.c Wed Oct 3 01:35:08 2001
+++ src/binutils/bucomm.c Fri Oct 5 23:18:43 2001
@@ -233,14 +233,14 @@ make_tempname (filename)
#endif
strcat (tmpname, "/");
strcat (tmpname, template);
- mktemp (tmpname);
+ mkstemp (tmpname);
*slash = c;
}
else
{
tmpname = xmalloc (sizeof (template));
strcpy (tmpname, template);
- mktemp (tmpname);
+ mkstemp (tmpname);
}
return tmpname;
}
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/nm.c src/binutils/nm.c
--- src-orig/binutils/nm.c Wed Oct 3 01:35:08 2001
+++ src/binutils/nm.c Fri Oct 5 23:31:39 2001
@@ -394,6 +394,8 @@ set_output_format (f)
format = &formats[i];
}
\f
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/objcopy.c src/binutils/objcopy.c
--- src-orig/binutils/objcopy.c Wed Oct 3 01:35:08 2001
+++ src/binutils/objcopy.c Fri Oct 5 23:30:56 2001
@@ -2599,6 +2599,8 @@ copy_main (argc, argv)
return 0;
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/objdump.c src/binutils/objdump.c
--- src-orig/binutils/objdump.c Wed Oct 3 01:35:08 2001
+++ src/binutils/objdump.c Fri Oct 5 23:30:56 2001
@@ -2738,6 +2738,8 @@ display_info ()
display_target_tables ();
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/size.c src/binutils/size.c
--- src-orig/binutils/size.c Wed Oct 3 01:35:09 2001
+++ src/binutils/size.c Fri Oct 5 23:31:51 2001
@@ -102,6 +102,8 @@ struct option long_options[] =
{0, no_argument, 0, 0}
};
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/binutils/strings.c src/binutils/strings.c
--- src-orig/binutils/strings.c Wed Oct 3 01:35:09 2001
+++ src/binutils/strings.c Fri Oct 5 23:31:26 2001
@@ -139,6 +139,8 @@ static void usage PARAMS ((FILE *stream,
static long get_char PARAMS ((FILE *stream, file_ptr *address,
int *magiccount, char **magic));
\f
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -413,7 +415,7 @@ get_char (stream, address, magiccount, m
char **magic;
{
int c, i;
- long r;
+ long r = EOF;
unsigned char buf[4];
for (i = 0; i < encoding_bytes; i++)
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/gas/gasp.c src/gas/gasp.c
--- src-orig/gas/gasp.c Wed Oct 3 01:35:22 2001
+++ src/gas/gasp.c Fri Oct 5 23:36:37 2001
@@ -3537,6 +3537,8 @@ show_help ()
show_usage (stdout, 0);
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
diff -BurpNX /bigdisk/src/binutils-exclude src-orig/gas/input-file.c src/gas/input-file.c
--- src-orig/gas/input-file.c Wed Oct 3 01:35:23 2001
+++ src/gas/input-file.c Fri Oct 5 23:38:48 2001
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include "as.h"
#include "input-file.h"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-05 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-05 16:04 [PATCH] Silence compiler warnings Thiemo Seufer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).