From patchwork Tue Dec 1 17:09:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 9855 Received: (qmail 65234 invoked by alias); 1 Dec 2015 17:10:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 63347 invoked by uid 89); 1 Dec 2015 17:10:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp12.uk.ibm.com Received: from e06smtp12.uk.ibm.com (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 01 Dec 2015 17:10:00 +0000 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Dec 2015 17:09:57 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 Dec 2015 17:09:55 -0000 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: uweigand@de.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0CFFB2190061 for ; Tue, 1 Dec 2015 17:09:48 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB1H9sHg10748404 for ; Tue, 1 Dec 2015 17:09:54 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tB1H9sxe016403 for ; Tue, 1 Dec 2015 10:09:54 -0700 Received: from oc7340732750.ibm.com (dyn-9-152-213-152.boeblingen.de.ibm.com [9.152.213.152]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id tB1H9sFu016400; Tue, 1 Dec 2015 10:09:54 -0700 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 359C0F8BD; Tue, 1 Dec 2015 18:09:54 +0100 (CET) Subject: Re: [PATCH 10/18] Remote thread create/exit events To: palves@redhat.com (Pedro Alves) Date: Tue, 1 Dec 2015 18:09:54 +0100 (CET) From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <565DC587.7060005@redhat.com> from "Pedro Alves" at Dec 01, 2015 04:06:31 PM MIME-Version: 1.0 Message-Id: <20151201170954.359C0F8BD@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15120117-0009-0000-0000-000006D77AC9 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. */