This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/18] Remote thread create/exit events
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: palves at redhat dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 1 Dec 2015 18:09:54 +0100 (CET)
- Subject: Re: [PATCH 10/18] Remote thread create/exit events
- Authentication-results: sourceware.org; auth=none
Pedro Alves wrote:
> On 12/01/2015 03:12 PM, Ulrich Weigand wrote:
> > But in any case, since p isn't used afterwards, any reason why
> > this couldn't instead just be:
> >
> > event->ptid = read_ptid (++p, NULL);
>
> Indeed, that should work.
OK, I've now checked in the following patch to fix the build break.
Thanks,
Ulrich
ChangeLog:
* remote.c (remote_parse_stop_reply): Avoid GCC 4.1 "operation
may be undefined" warning.
diff --git a/gdb/remote.c b/gdb/remote.c
index c60f173..52c5df8 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -6548,7 +6548,7 @@ Packet: '%s'\n"),
event->ws.value.integer = value;
if (*p != ';')
error (_("stop reply packet badly formatted: %s"), buf);
- event->ptid = read_ptid (++p, &p);
+ event->ptid = read_ptid (++p, NULL);
break;
}
case 'W': /* Target exited. */
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com