From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zfbKHq7+32ZrFCYAWB0awg (envelope-from ) for ; Tue, 10 Sep 2024 04:09:18 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=XEq+GC9A; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Ynd0nGRB; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=XEq+GC9A; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Ynd0nGRB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5F3451E353; Tue, 10 Sep 2024 04:09:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-11.8 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6045B1E05C for ; Tue, 10 Sep 2024 04:09:17 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD8F7385C6D1 for ; Tue, 10 Sep 2024 08:09:16 +0000 (GMT) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id E9BBA3858C98 for ; Tue, 10 Sep 2024 08:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9BBA3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E9BBA3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725955736; cv=none; b=RfEDLn8Q5VTKjlTUGmy6kJMtMLULAbo0F/cmahpYNNssQPeOOJmz5aY3jOL6RLHgXqd4IQ48wMosbylRDDOEAP71pp2IxufOxMnKmh4n0/55iA2qg+pMCUezCNobE+oELBeDtQ+Xs3PzBvNYKaQGU0hbyMArLox6Dh8ETPhd4qA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725955736; c=relaxed/simple; bh=KeFlXDGsFIiBHbTlo5eCDJPC9xKtRZ0/qUUq4H0NjYA=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=HmZw8Q2H0HyYIjdVF7lhmTbJF8QTFCmgsPxlpekxwcA6iNJG5/wZgYZGz0J3BjEP2KWf2FUav1G0czZNUdGbgMscp/dnixYWmMBiJfV3RYTSQdJwFJUBChIs8AmidzENJr/WzHAhSVnBBxoSk+Bt9t8O71M+ziRgbqHpVGGvlKo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 573DE1F454; Tue, 10 Sep 2024 08:08:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725955733; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZRY9DIssV08ixIljpMwh3DSbvyHNvoqpogiIhsawRjE=; b=XEq+GC9AxyI9N57QzZQdMRefa13J4rhZ16LtpyQSXj6gPw/rLRaeRagFooXXZ1iUj3QQp1 771IKTsKBe8rfXuCACRi8afjz3s0yLD9VSVqY8P02m1u/V4qNaSnqnPXt+r0t186nSZj9/ tgMlpvfmO9xo5bVFKuIIXEv2fayrK0w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725955733; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZRY9DIssV08ixIljpMwh3DSbvyHNvoqpogiIhsawRjE=; b=Ynd0nGRBYQdretZ1B5WwWIYv6mHDMHU3Dnx+HpwltUCraTCGSaZLQePlMlFfNTIBNbMfYc xJMvG869vht5XdAQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725955733; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZRY9DIssV08ixIljpMwh3DSbvyHNvoqpogiIhsawRjE=; b=XEq+GC9AxyI9N57QzZQdMRefa13J4rhZ16LtpyQSXj6gPw/rLRaeRagFooXXZ1iUj3QQp1 771IKTsKBe8rfXuCACRi8afjz3s0yLD9VSVqY8P02m1u/V4qNaSnqnPXt+r0t186nSZj9/ tgMlpvfmO9xo5bVFKuIIXEv2fayrK0w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725955733; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZRY9DIssV08ixIljpMwh3DSbvyHNvoqpogiIhsawRjE=; b=Ynd0nGRBYQdretZ1B5WwWIYv6mHDMHU3Dnx+HpwltUCraTCGSaZLQePlMlFfNTIBNbMfYc xJMvG869vht5XdAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3FB2F132CB; Tue, 10 Sep 2024 08:08:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OaMPDpX+32aNMwAAD6G6ig (envelope-from ); Tue, 10 Sep 2024 08:08:53 +0000 Message-ID: <2a9b49f3-0242-4319-98a2-f78d02f52332@suse.de> Date: Tue, 10 Sep 2024 10:09:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/build] Fix unused var in corelow.c To: Lancelot SIX Cc: gdb-patches@sourceware.org References: <20240909041913.929-1-tdevries@suse.de> Content-Language: en-US From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 9/9/24 15:35, Lancelot SIX wrote: > Hi, > > FYI, I see the same issue on a CI system. > > FWIW, the patch looks good to me. > Hi Lancelot, thanks for the review, pushed. - Tom > Reviewed-By: Lancelot Six > > Best, > Lancelot. > > On Mon, Sep 09, 2024 at 06:19:13AM +0200, Tom de Vries wrote: >> On x86_64-linux, with gcc 7.5.0 and CFLAGS/CXXFLAGS="-O0 -g -Wall" I ran into >> a build breaker: >> ... >> gdb/corelow.c: In member function ‘void mapped_file_info::add(const char*, const char*, const char*, std::vector&&, const bfd_build_id*)’: >> gdb/corelow.c:1822:27: error: unused variable ‘it’ [-Werror=unused-variable] >> const auto [it, inserted] >> ^ >> ... >> >> Fix this by dropping the variable it. >> >> Tested on x86_64-linux. >> --- >> gdb/corelow.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/gdb/corelow.c b/gdb/corelow.c >> index 16f07c23faa..ab2fa746de8 100644 >> --- a/gdb/corelow.c >> +++ b/gdb/corelow.c >> @@ -1819,8 +1819,8 @@ mapped_file_info::add (const char *soname, >> parsed, we group the build-id information based on the file name. As >> a consequence, we should see each EXPECTED_FILENAME value exactly >> once. This means that each insertion should always succeed. */ >> - const auto [it, inserted] >> - = m_filename_to_build_id_map.emplace (expected_filename, build_id); >> + const auto inserted >> + = m_filename_to_build_id_map.emplace (expected_filename, build_id).second; >> gdb_assert (inserted); >> >> /* Setup the reverse build-id to file name map. */ >> >> base-commit: 29c70787112e01cd52b53bf14bdcacb0a11e0725 >> -- >> 2.35.3 >>