This is the mail archive of the gdb-patches@sourceware.org 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 10/18] Remote thread create/exit events


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


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