This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


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

Re: Patches for some warnings in gdb


>>>>> Andreas Jaeger writes:

 > I got the following warnings on Linux/ix86 with the current gdb CVS
 > version.  I've fixed them with the appended patch.

 > ../../cvs/gdb/gdb/findvar.c:1030: warning: type of `pid' defaults to `int'
 > ../../cvs/gdb/gdb/fork-child.c:492: warning: implicit declaration of function `dont_repeat'
 > ../../cvs/gdb/gdb/tracepoint.c:502: warning: int format, long int arg (arg 3)
 > ../../cvs/gdb/gdb/tracepoint.c:1767: warning: unsigned int format, long unsigned int arg (arg 6)
 > ../../cvs/gdb/gdb/kod.c:34: warning: `show_kod' declared `static' but never defined

 > Andreas

Upps, I missed to add the kod.c patch.  Here comes the complete patch.

Andreas

1999-11-02  Andreas Jaeger  <aj@suse.de>

	* kod.c: Remove show_kod prototype since the function is nowhere
	defined.

	* tracepoint.c (tracepoints_info): step_count is long int, adjust
	printf_filtered specs.
	(trace_start_command): Likewise for sprintf call.

 	* fork-child.c: Include "command.h" for dont_repeat prototype.

 	* findvar.c (generic_target_read_pc): Declare pid as int to avoid
	gcc warning.

Index: kod.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/kod.c,v
retrieving revision 1.1.1.2
diff -u -u -r1.1.1.2 kod.c
--- kod.c	1999/09/22 03:24:42	1.1.1.2
+++ kod.c	1999/11/02 10:03:05
@@ -31,7 +31,6 @@
 void _initialize_kod (void);
 
 /* Prototypes for local functions.  */
-static void show_kod (char *, int);
 static void info_kod_command (char *, int);
 static void load_kod_library (char *);
 
Index: tracepoint.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/tracepoint.c,v
retrieving revision 1.1.1.9
diff -u -u -r1.1.1.9 tracepoint.c
--- tracepoint.c	1999/11/02 04:44:19	1.1.1.9
+++ tracepoint.c	1999/11/02 10:03:08
@@ -499,7 +499,7 @@
 	printf_filtered ("%s ",
 			 local_hex_string_custom ((unsigned long) t->address,
 						  "08l"));
-      printf_filtered ("%-5d %-5d ", t->pass_count, t->step_count);
+      printf_filtered ("%-5d %-5ld ", t->pass_count, t->step_count);
 
       if (t->source_file)
 	{
@@ -1762,7 +1762,7 @@
 	char tmp[40];
 
 	sprintf_vma (tmp, t->address);
-	sprintf (buf, "QTDP:%x:%s:%c:%x:%x", t->number, tmp, /* address */
+	sprintf (buf, "QTDP:%x:%s:%c:%lx:%x", t->number, tmp, /* address */
 		 t->enabled == enabled ? 'E' : 'D',
 		 t->step_count, t->pass_count);
 
Index: fork-child.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/fork-child.c,v
retrieving revision 1.1.1.4
diff -u -u -r1.1.1.4 fork-child.c
--- fork-child.c	1999/08/31 01:04:56	1.1.1.4
+++ fork-child.c	1999/11/02 10:03:09
@@ -20,6 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "command.h"
 #include "gdb_string.h"
 #include "frame.h"		/* required by inferior.h */
 #include "inferior.h"
Index: findvar.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/findvar.c,v
retrieving revision 1.1.1.7
diff -u -u -r1.1.1.7 findvar.c
--- findvar.c	1999/09/08 23:59:10	1.1.1.7
+++ findvar.c	1999/11/02 10:03:10
@@ -1027,6 +1027,7 @@
 
 CORE_ADDR
 generic_target_read_pc (pid)
+     int pid;
 {
 #ifdef PC_REGNUM
   if (PC_REGNUM >= 0)

-- 
 Andreas Jaeger   
  SuSE Labs aj@suse.de	
   private aj@arthur.rhein-neckar.de

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