Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Kill a warning in linux-low.c
@ 2002-02-05 14:13 Daniel Jacobowitz
  2002-02-06  4:26 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-05 14:13 UTC (permalink / raw)
  To: gdb-patches

Waitpid's second argument is an (int *), not a (union wait *).  Committed as
obvious.

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

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2140
diff -u -p -r1.2140 ChangeLog
--- ChangeLog	2002/02/05 22:01:48	1.2140
+++ ChangeLog	2002/02/05 22:03:57
@@ -1,5 +1,10 @@
 2002-02-05  Daniel Jacobowitz  <drow@mvista.com>
 
+	* gdbserver/linux-low.c (mywait): Cast second argument of waitpid
+	to (int *).
+
+2002-02-05  Daniel Jacobowitz  <drow@mvista.com>
+
 	* gdbserver/linux-low.c (kill_inferior): Remove commented out
 	code.
 
Index: gdbserver/linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.5
diff -u -p -r1.5 linux-low.c
--- linux-low.c	2002/02/05 22:01:49	1.5
+++ linux-low.c	2002/02/05 22:03:57
@@ -119,7 +119,7 @@ mywait (char *status)
   union wait w;
 
   enable_async_io ();
-  pid = waitpid (inferior_pid, &w, 0);
+  pid = waitpid (inferior_pid, (int *)&w, 0);
   disable_async_io ();
   if (pid != inferior_pid)
     perror_with_name ("wait");


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kill a warning in linux-low.c
  2002-02-05 14:13 [PATCH] Kill a warning in linux-low.c Daniel Jacobowitz
@ 2002-02-06  4:26 ` Andreas Schwab
  2002-02-06  7:21   ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2002-02-06  4:26 UTC (permalink / raw)
  To: gdb-patches

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?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kill a warning in linux-low.c
  2002-02-06  4:26 ` Andreas Schwab
@ 2002-02-06  7:21   ` Daniel Jacobowitz
  2002-02-20 14:57     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-06  7:21 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

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.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kill a warning in linux-low.c
  2002-02-06  7:21   ` Daniel Jacobowitz
@ 2002-02-20 14:57     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-20 14:57 UTC (permalink / raw)
  To: Andreas Schwab, gdb-patches

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");


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-20 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05 14:13 [PATCH] Kill a warning in linux-low.c Daniel Jacobowitz
2002-02-06  4:26 ` Andreas Schwab
2002-02-06  7:21   ` Daniel Jacobowitz
2002-02-20 14:57     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox