From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id C15D33858CDA for ; Tue, 10 Jan 2023 02:53:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C15D33858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D29381E0D3; Mon, 9 Jan 2023 21:53:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1673319199; bh=/Q3bjB2PRwdrnpUuIyHufprwc+PQ1VHwC+0Kz1wunHo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Dgiy3kAgdgPYtc/irORt3/H3OKx3j5VoSHaueg+tbc/KEG0FExPJbPf5zEwKoS8U1 5Bsut59gYejgF18ZWh7ulU0lh7vjqi/3RP9LZE993HtAVWHQAix1xFbH7gdIpyZYw+ zpoGrnASwqW/IILe3UInDub1ASWIp8ELAtWci4ys= Message-ID: <4699348d-a38c-27ac-7fb5-d055c2e8bf91@simark.ca> Date: Mon, 9 Jan 2023 21:53:18 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] gdb/linespec.c: Fix -Wmaybe-uninitialized warning Content-Language: en-US To: Aaron Merey , Tom Tromey Cc: Aaron Merey via Gdb-patches References: <20230107004941.589074-1-amerey@redhat.com> <87fscjab1t.fsf@tromey.com> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/9/23 20:16, Aaron Merey via Gdb-patches wrote: > Hi Tom, > > On Mon, Jan 9, 2023 at 12:10 PM Tom Tromey wrote: >> Thanks, this is ok. >> I think normally we allow these little uninitialized warning fixes under >> the obvious rule. > > Thanks, pushed as commit 2ff63a29b0b. Will push as obvious next time. > > Aaron > In my opinion, these shouldn't be obvious, because there's always the chance that the compiler is actually right (and the author misses it), and by initializing the variable, we cover up a bug. Simon