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

Re: [PATCH] Kill a warning in linux-low.c


On Wed, Feb 06, 2002 at 10:21:40AM -0500, Daniel Jacobowitz wrote:
> On Wed, Feb 06, 2002 at 01:25:46PM +0100, Andreas Schwab wrote:
> > Daniel Jacobowitz <drow@mvista.com> writes:
> > 
> > |> Waitpid's second argument is an (int *), not a (union wait *).  Committed as
> > |> obvious.
> > 
> > Wouldn't it be better to make w an int instead?
> 
> A little digging around in glibc tells me - yes, you're right.  Union
> wait is a BSD-ism.
> 
> I'll fix this after the other three gdbserver patches get looked at.

Fixed thusly; committed.

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

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2239
diff -u -p -r1.2239 ChangeLog
--- ChangeLog	2002/02/20 22:51:40	1.2239
+++ ChangeLog	2002/02/20 22:56:30
@@ -1,5 +1,10 @@
 2002-02-20  Daniel Jacobowitz  <drow@mvista.com>
 
+	* gdbserver/linux-low.c (mywait): Change argument to waitpid
+	to be an integer instead of a `union wait'.
+
+2002-02-20  Daniel Jacobowitz  <drow@mvista.com>
+
 	* mips-linux-nat.c: Call the operating system GNU/Linux.
 	* mips-linux-tdep.c: Likewise.
 	* mips-tdep.c: Likewise.
Index: gdbserver/linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.7
diff -u -p -r1.7 linux-low.c
--- linux-low.c	2002/02/14 06:21:22	1.7
+++ linux-low.c	2002/02/20 22:56:30
@@ -109,10 +109,10 @@ unsigned char
 mywait (char *status)
 {
   int pid;
-  union wait w;
+  int w;
 
   enable_async_io ();
-  pid = waitpid (inferior_pid, (int *)&w, 0);
+  pid = waitpid (inferior_pid, &w, 0);
   disable_async_io ();
   if (pid != inferior_pid)
     perror_with_name ("wait");


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