Re: [PATCH 10/18] Remote thread create/exit events

Ulrich Weigand
2015-12-01T17:10:02Z

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