From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68048 invoked by alias); 30 May 2018 14:01:53 -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 68039 invoked by uid 89); 30 May 2018 14:01:52 -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,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1284, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 May 2018 14:01:50 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A37740201A1 for ; Wed, 30 May 2018 14:01:49 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EEE62144B20; Wed, 30 May 2018 14:01:48 +0000 (UTC) Subject: Re: [RFC][PATCH v3] Consolidate gdbserver global variables To: Stan Cox , gdb-patches@sourceware.org References: <3153f899-a653-9372-72fd-25ea874f7d3c@redhat.com> <44875dda-adc6-d9a4-940c-0c27aeac574b@redhat.com> <6a41763b-6949-2d32-37fa-9d3f1afceec1@redhat.com> <7d9764b6-d95a-96b4-b064-27ce539327cf@redhat.com> <9988957e-3bf8-cbe8-6c08-58706b11bd60@redhat.com> <9e844707-a2f8-c969-4d09-7ee2fa3bd1ed@redhat.com> <5a41d41f-a0ce-2941-c759-fb1854a1792c@redhat.com> From: Pedro Alves Message-ID: Date: Wed, 30 May 2018 14:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-05/txt/msg00786.txt.bz2 On 05/29/2018 08:52 PM, Stan Cox wrote: > > > On 05/25/2018 10:31 AM, Pedro Alves wrote: > >> You mean, without the change, we trigger a warning?  What >> does it look like?  If we do, then we'll need to address it >> somehow, of course, given -Werror. > > This is vanilla upstream gdb, no patches, Ah, alright, since this happens on pristine master, it's unrelated to your patch. Please leave it out. And ... > with gcc 7.3.1 on F27 > > ../../../src/gdb/gdbserver/server.c: In function ‘int handle_qxfer_btrace_conf(const char*, gdb_byte*, const gdb_byte*, ULONGEST, LONGEST)’: > ../../../src/gdb/gdbserver/server.c:1966:7: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized] >        if (result != 0) >        ^~ > ../../../src/gdb/gdbserver/server.c: In function ‘int handle_qxfer_btrace(const char*, gdb_byte*, const gdb_byte*, ULONGEST, LONGEST)’: > ../../../src/gdb/gdbserver/server.c:1895:7: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized] >        if (result != 0) >        ^~ I've looked into this and pushed a fix, here: https://sourceware.org/ml/gdb-patches/2018-05/msg00783.html Thanks, Pedro Alves