Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andreas Schwab <schwab@suse.de>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Kill a warning in linux-low.c
Date: Wed, 20 Feb 2002 14:57:00 -0000	[thread overview]
Message-ID: <20020220175711.B6035@nevyn.them.org> (raw)
In-Reply-To: <20020206102140.A17033@nevyn.them.org>

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


      reply	other threads:[~2002-02-20 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05 14:13 Daniel Jacobowitz
2002-02-06  4:26 ` Andreas Schwab
2002-02-06  7:21   ` Daniel Jacobowitz
2002-02-20 14:57     ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020220175711.B6035@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox