This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

[commit] Fix compiler warnings in target.[ch]


Another few bits that GCC 4 complains about.  This pushes the warnings
elsewere, but at least it's a small step into the right direction.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* target.h (target_read_memory_partial,	target_write_memory_partial):
	Change second argument to 'gdb_byte *'.
	* target.c (target_xfer_memory_partial): Change third argument to
	'gdb_byte *'.
	(target_read_memory_partial, target_write_memory_partial): Change
	second argument to 'gdb_byte *'.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.113
diff -u -p -r1.113 target.c
--- target.c 17 Dec 2005 22:34:03 -0000 1.113
+++ target.c 10 Jan 2006 22:36:21 -0000
@@ -1,7 +1,8 @@
 /* Select target systems and architectures at runtime for GDB.
 
    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -1179,7 +1180,7 @@ target_xfer_memory (CORE_ADDR memaddr, g
    If we fail, set *ERR to a non-zero errno value, and return -1.  */
 
 static int
-target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len,
+target_xfer_memory_partial (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
 			    int write_p, int *err)
 {
   int res;
@@ -1240,7 +1241,8 @@ target_xfer_memory_partial (CORE_ADDR me
 }
 
 int
-target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
+target_read_memory_partial (CORE_ADDR memaddr, gdb_byte *buf,
+			    int len, int *err)
 {
   if (target_xfer_partial_p ())
     {
@@ -1268,7 +1270,8 @@ target_read_memory_partial (CORE_ADDR me
 }
 
 int
-target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
+target_write_memory_partial (CORE_ADDR memaddr, gdb_byte *buf,
+			     int len, int *err)
 {
   if (target_xfer_partial_p ())
     {
@@ -1421,7 +1424,7 @@ ULONGEST
 get_target_memory_unsigned (struct target_ops *ops,
 			    CORE_ADDR addr, int len)
 {
-  char buf[sizeof (ULONGEST)];
+  gdb_byte buf[sizeof (ULONGEST)];
 
   gdb_assert (len <= sizeof (buf));
   get_target_memory (ops, addr, buf, len);
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.77
diff -u -p -r1.77 target.h
--- target.h 17 Dec 2005 22:34:03 -0000 1.77
+++ target.h 10 Jan 2006 22:36:22 -0000
@@ -1,7 +1,8 @@
 /* Interface between GDB and target environments, including files and processes
 
    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by John Gilmore.
 
@@ -554,11 +555,11 @@ extern int child_xfer_memory (CORE_ADDR,
    of bytes actually transfered is not defined) and ERR is set to a
    non-zero error indication.  */
 
-extern int target_read_memory_partial (CORE_ADDR addr, char *buf, int len,
-				       int *err);
+extern int target_read_memory_partial (CORE_ADDR addr, gdb_byte *buf,
+				       int len, int *err);
 
-extern int target_write_memory_partial (CORE_ADDR addr, char *buf, int len,
-					int *err);
+extern int target_write_memory_partial (CORE_ADDR addr, gdb_byte *buf,
+					int len, int *err);
 
 extern char *child_pid_to_exec_file (int);
 


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