This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Warnings roundup - gprof


Again, all obvious, and committed.  These came in when Alan turned on more
warnings last week, I think.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-02-10  Daniel Jacobowitz  <drow@mvista.com>

	* gprof.c: Include "getopt.h" after other includes, so that
	the proper macros are defined.
	* gen-c-prog.awk: Emit a prototype for the generated function.

Index: gprof/gen-c-prog.awk
===================================================================
RCS file: /cvs/src/src/gprof/gen-c-prog.awk,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 gen-c-prog.awk
--- gen-c-prog.awk	1999/05/03 07:29:11	1.1.1.1
+++ gen-c-prog.awk	2002/02/10 18:20:36
@@ -3,6 +3,7 @@ NR == 1	{
     print "/* ==> Do not modify this file!!  It is created automatically"
     printf "   from %s using the gen-c-prog.awk script.  <== */\n\n", FILE
     print "#include <stdio.h>"
+    print "#include \"ansidecl.h\""
 }
 
 	{
@@ -12,6 +13,7 @@ NR == 1	{
 		print "}"
 	      curfun = FUNCTION
 	      print ""
+	      print "void ", FUNCTION, "PARAMS ((FILE *));"
 	      print "void";
 	      printf "%s (file)\n", FUNCTION
 	      print "     FILE *file;";
Index: gprof/gprof.c
===================================================================
RCS file: /cvs/src/src/gprof/gprof.c,v
retrieving revision 1.11
diff -u -p -r1.11 gprof.c
--- gprof.c	2002/02/01 08:24:16	1.11
+++ gprof.c	2002/02/10 18:20:36
@@ -16,7 +16,6 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#include "getopt.h"
 #include "libiberty.h"
 #include "gprof.h"
 #include "search_list.h"
@@ -32,6 +31,7 @@
 #include "hist.h"
 #include "sym_ids.h"
 #include "demangle.h"
+#include "getopt.h"
 
 static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
 int main PARAMS ((int, char **));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]