From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97736 invoked by alias); 1 Dec 2015 15:12:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 97496 invoked by uid 89); 1 Dec 2015 15:12:36 -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: e06smtp07.uk.ibm.com Received: from e06smtp07.uk.ibm.com (HELO e06smtp07.uk.ibm.com) (195.75.94.103) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 01 Dec 2015 15:12:35 +0000 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Dec 2015 15:12:32 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 Dec 2015 15:12:28 -0000 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: uweigand@de.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0D6041B08070 for ; Tue, 1 Dec 2015 15:12:54 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB1FCSWG57671778 for ; Tue, 1 Dec 2015 15:12:28 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 tB1FCRDx028877 for ; Tue, 1 Dec 2015 08:12:27 -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 tB1FCRLL028861; Tue, 1 Dec 2015 08:12:27 -0700 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 7FB35F8BD; Tue, 1 Dec 2015 16:12:27 +0100 (CET) Subject: Re: [PATCH 10/18] Remote thread create/exit events To: palves@redhat.com (Pedro Alves) Date: Tue, 01 Dec 2015 15:12:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <1444836486-25679-11-git-send-email-palves@redhat.com> from "Pedro Alves" at Oct 14, 2015 04:27:58 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20151201151227.7FB35F8BD@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15120115-0029-0000-0000-00000504DB3F X-SW-Source: 2015-12/txt/msg00014.txt.bz2 Pedro Alves wrote: > + case 'w': /* Thread exited. */ > + { > + char *p; > + ULONGEST value; > + > + event->ws.kind = TARGET_WAITKIND_THREAD_EXITED; > + p = unpack_varlen_hex (&buf[1], &value); > + event->ws.value.integer = value; > + if (*p != ';') > + error (_("stop reply packet badly formatted: %s"), buf); > + event->ptid = read_ptid (++p, &p); This causes a build error on my RHEL 5 daily build system (using the GCC 4.1.2 host compiler) due to: gdb/remote.c: In function 'remote_parse_stop_reply': gdb/remote.c:6549: warning: operation on 'p' may be undefined I'm not 100% convinced this is really undefined, since the value of &p doesn't change whether or not ++p is evaluated before or after it. 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); Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com