Message ID | 20240612205912.97-1-romain.geissler@amadeus.com |
---|---|
State | New |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC55C388206B for <patchwork@sourceware.org>; Wed, 12 Jun 2024 20:59:34 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::62f]) by sourceware.org (Postfix) with ESMTPS id C023F3870899 for <libabigail@sourceware.org>; Wed, 12 Jun 2024 20:59:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C023F3870899 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=amadeus.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=amadeus.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C023F3870899 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2606::62f ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718225969; cv=pass; b=w7Edv9r+2uGfIg0smlwpw7yBbQ42AUIr9YDrTi2jm3Hn7FWClzy2M8F2DmsjvMf2cpOSdLtUBmiCaNIJM9jFWOopVs68lOzlocLdWWCsLBi4HHhVLTB9oQ/9bwECj5vEUj1b/quW7j/4VNxIyqGG57twTwfJdriGQ1tS0DWIEMA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718225969; c=relaxed/simple; bh=8Sah68mvFIvWNffiBg/8s3cUobseIj5aZKyojjcfldY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iOdkyjprgvEXikQqcVc7Tj6h3skA589sS+3TXMmOeXaGT62bORiWJb8Xy3l8MB/+lcdVqwwRRCngGE5Njj9z0bS+HJkYaifNeuriDDrovuz2T8FMZhGcdclXHFEqEsrGmf3ioeD/gH6bsVoEbD6gNi/g4gZffjAlGQSgLIS758w= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WG6M+VWE3R/zHAgQT3uu+K5sVeAdg3u9/lG8Mh9JkyelZyKwTW6anyiDeviMqU1j48/wV/cFeaMYFKTsOeyihf8lHpbvahrYsXSt0Sih+ntDYedi3tMyXPUsjxy6LGocQQkJszbVIGe3cvRM/2/IWQeATZMytA8WLMD/0ogyZKB7Ip3fEIJdvtisZbZAKd8XEKcYK/BsqjYrIgy6CWTB45dCJojqajovFN+gCHUH48Xad02eUUr75iP9opcOvluck6ekqc986zALQAPxMuFI+NXW1uTezbgrH0o3h7IkCx1mrYVzz6L/OgoyvJlCvpwaCG6zBuvsMHLgr0MAQ3e9ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OyyGpnWbV7a2bFrbNOb4RRcHm5FzzPiy8hF+fUh0GiE=; b=EOB+hUqiQjAeNZtbiZkrb9bbfk+7zi8tcKC32M1VU5BdBCdkyem0Zh9J2e0HzMapZtCjugIi63X1MtYdpbJeMqW/TLOazL3e1l5jGwvqqVhtxm4YTJIxqc5r1AmGc0W528Q71P7Ug6B6c9TKvRxHGCKhUi0atfsShYfohGWrYvncGDpzk2ecMR2njYumk+ZE0lvTL6IfwJhvTTywRZbuNy05D3AXj3WVWDirkgL4flYSN18VpBr40Pd96xRf4JCuMB6Sxjh02nrHS0kMuKE9G4LokjsvblRJ/Ia0YePEyPrah1maROXzeKDZ0kk5hbmDx1vb9df4aY690BtAT3KrNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 20.4.2.173) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amadeus.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=amadeus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amadeus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OyyGpnWbV7a2bFrbNOb4RRcHm5FzzPiy8hF+fUh0GiE=; b=Yw4k9Fwgx2km2ZureDDFTrNyOHDQeMxYqz0i8aSSgXzIBLfiuZRFxtijO0F3yUe/VTqwlJSERjUUSC77XtXymaFTx41rQj/K24+QDaFGJj81JterBbnsKJ7o0GacMIKtUnNfjrDRwvTu0+ziaxkwID/LGKHCb7/kZm5Ljr3xXNz2H7uifpIyccHFJ1xYozuvb3iQWXigXgOWqKMdnYpf2O+qEf68BNPbhO9XRUFxVgBbePX3iajq1NTzfMrMg7zRYIC9WFt+oYdMP1WH+yAj65DK3LhwZc3ozVJxWgo5wS+gpTnVv3U/E6HKG1p/KU9UodOnfhU/oreIsr5R3vseSA== Received: from DB7PR05CA0003.eurprd05.prod.outlook.com (2603:10a6:10:36::16) by DB8PR10MB3529.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:13e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Wed, 12 Jun 2024 20:59:24 +0000 Received: from DB1PEPF000509FC.eurprd03.prod.outlook.com (2603:10a6:10:36:cafe::f8) by DB7PR05CA0003.outlook.office365.com (2603:10a6:10:36::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.20 via Frontend Transport; Wed, 12 Jun 2024 20:59:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.4.2.173) smtp.mailfrom=amadeus.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amadeus.com; Received-SPF: Pass (protection.outlook.com: domain of amadeus.com designates 20.4.2.173 as permitted sender) receiver=protection.outlook.com; client-ip=20.4.2.173; helo=smtpexch.amadeus.com; pr=C Received: from smtpexch.amadeus.com (20.4.2.173) by DB1PEPF000509FC.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Wed, 12 Jun 2024 20:59:24 +0000 Received: from OCPPRDEXHYB2.iis.amadeus.net (10.79.64.49) by smtpexch.amadeus.com (10.79.80.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 12 Jun 2024 20:59:23 +0000 Received: from MUCEX20MBX001.iis.amadeus.net (172.19.131.74) by OCPPRDEXHYB2.iis.amadeus.net (10.79.64.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 12 Jun 2024 20:59:23 +0000 Received: from 4f78a6f3c3ab.rnd.amadeus.net (10.64.176.26) by MUCEX20MBX001.iis.amadeus.net (172.19.131.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 12 Jun 2024 20:59:23 +0000 From: Romain Geissler <romain.geissler@amadeus.com> To: <libabigail@sourceware.org> CC: <romain.geissler@amadeus.com> Subject: [PATCH] abg-leaf-reporter.cc: Fix build with gcc 4.9. Date: Wed, 12 Jun 2024 20:59:12 +0000 Message-ID: <20240612205912.97-1-romain.geissler@amadeus.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MUCEXHYBP01.iis.amadeus.net (172.19.131.107) To MUCEX20MBX001.iis.amadeus.net (172.19.131.74) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509FC:EE_|DB8PR10MB3529:EE_ X-MS-Office365-Filtering-Correlation-Id: f782f008-b32e-40e7-9ea8-08dc8b228a1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230034|376008|1800799018|82310400020|36860700007; X-Microsoft-Antispam-Message-Info: ATiME7YP1w3YRZvnLu4aao3k1dL9l9M+Th/PasWqaolx38F7H0z3CSemnw7ZyOtwmi4NhiIOKnBl0jZeU2yRjicaslk/H8RghWYVSeIe+WVphh7ZG/Qx1/ockZiNI7GM6XMjQWP5DuhNAImjj36MuwPdUw3tvsV5G0i4cR8U3+zPn+vwfHv3djn+U+akqeq/A3iDLd5EopQewyHrQ14KAFuIqvfIbN7TwKFpYnVQZQOw9PB6oHp6n13++gHvPC5doZg+phiB/9VmvNfuA47MGnWVcyvJZsZBaraiE5ppA2NX9ABeMjHJB+i/yveojedzthrZ9XClrgOt1Kyq73fP7odcOKEM3FHQkg/hekxoHpPRvxfdP0NoZWr5rqZdfIn+8n+9wkqHK3iQOFAK2uyQMqLazQV9ywAIakrdKbDGwCkpefXywEQn8796wa5XbEkFtcv0eK4QHXTXub9RX/OJ+G+N+l/QWubNiMJPk8Rpc2Ko/uRrYxXhLehOUki3kQ6G5oezh9vwvNCFl0GyCOk5dWs4OeCud3zxdxSPLE99x26WMoA6Hs7B7m0b2lucbE/XuFJAEz7u158Q0ssnceqfChnZqCDn91zb9IHGvB1QlGJuSWcYdgCSOe65LANxJ1B8gjGKYYShN7ZfkDrMBCcDdvAcpjSX3EoF5XGMoRT5qJ32kHwLiErGf8rl62hQr7FGo5ilcBwi+BpYJ5HCkRR66H303zAxkxUr1u6fOxiN5bxsv5kaDRbukt+XdsXpU0qmxrzCEKGMZtiT0Vx3oPlixj69BGjytDtuLvnTaPzKcHvhs8kZ99/+t7Txb92/z6/gfdYi3MplTmJg1ZmyTXG2yPEV48P4QNSsM4NBU7xBP5UsOkuRSd4dANpN3SXlygUGQq2ge3XNFh2NJJVNJqgea284zxpNoEqDVOw822OdJ16lrhvQtRp2/Jz1QX24bXQl6/W5NP1S9xlna7sxSlrLWt+pkYQVN6oPTyZjcvIiDLbsCi4eN1gMqNsB8Kcb/sTVKG6QUDFqQkAkcc1DWV6ns+KvszCnJwmQNPPRsd3ho68N/G7iZnAadCrYG5/anXqb7k/l/W3tFzgGwa7vkouVyIWNJWQiiYvMBfS5LTQOUWCbLXPa8bJVZrHUDEYraM0jCbYBa4elZjMcZHutvMXGhC4jbaJr/q/7h2z722gNWgSgbiasE6gVJcASeIpU9BF89BTSgWt4aZVRYRXwoQkp7tY6482W7fewzK6EeuRXIBBUDvK9FhznCcDlEbMkvV1AQikJxj7yzHmsNcEkXV6dnsvhZA0njXyBwAgmwrrcrjWag1u4z6pWnq6/IodBH5CPAe94d8/RlZDAh8BTpJftoQI8NqYjRWb8q0kBl9ZKrEYQ5VVLnGi3cv1PnsoUpBclM2bhp20yRcKBB766Acwslw== X-Forefront-Antispam-Report: CIP:20.4.2.173; CTRY:NL; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:smtpexch.amadeus.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230034)(376008)(1800799018)(82310400020)(36860700007); DIR:OUT; SFP:1101; X-OriginatorOrg: amadeus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2024 20:59:24.1266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f782f008-b32e-40e7-9ea8-08dc8b228a1c X-MS-Exchange-CrossTenant-Id: b3f4f7c2-72ce-4192-aba4-d6c7719b5766 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b3f4f7c2-72ce-4192-aba4-d6c7719b5766; Ip=[20.4.2.173]; Helo=[smtpexch.amadeus.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509FC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3529 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Post: <mailto:libabigail@sourceware.org> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org |
Series |
abg-leaf-reporter.cc: Fix build with gcc 4.9.
|
|
Commit Message
Romain Geissler
June 12, 2024, 8:59 p.m. UTC
Hi Dodji,
FYI I am having a small build error when building with gcc 4.9 (yes
unfortunately we still have cases where we use such an old toolchain):
/workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc: In member function 'virtual void abigail::comparison::leaf_reporter::report(const abigail::comparison::corpus_diff&, std::ostream&, const string&) const':
/workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc:1311:21: error: use of 'd' before deduction of 'auto'
for (auto d : d.priv_->sorted_changed_vars_)
This patch slightly changes the code to avoid this shadowing case, a use
of auto, and IMO actually makes the code simpler. Is it ok to apply ?
Cheers,
Romain
abg-leaf-reporter.cc: Fix build with gcc 4.9.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
---
src/abg-leaf-reporter.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Hello Romain, Sorry for my late reply, I was on the road. Romain Geissler <romain.geissler@amadeus.com> a écrit: > Hi Dodji, > > FYI I am having a small build error when building with gcc 4.9 (yes > unfortunately we still have cases where we use such an old toolchain): > > /workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc: In member function 'virtual void abigail::comparison::leaf_reporter::report(const abigail::comparison::corpus_diff&, std::ostream&, const string&) const': > /workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc:1311:21: error: use of 'd' before deduction of 'auto' > for (auto d : d.priv_->sorted_changed_vars_) > > This patch slightly changes the code to avoid this shadowing case, a use > of auto, and IMO actually makes the code simpler. Is it ok to apply ? Yes, of course, the patch looks quite trivial. Many thanks for putting it together. I have just added the "required" (boring) ChangeLog part to it. It now looks like: From 9a48f1296154d8f6d5333308f6b2649b6bf55934 Mon Sep 17 00:00:00 2001 From: Romain Geissler <romain.geissler@amadeus.com> Date: Wed, 12 Jun 2024 20:59:12 +0000 Subject: [PATCH] abg-leaf-reporter.cc: Fix build with gcc 4.9. * src/abg-leaf-reporter.cc (leaf_reporter::report): In the overload for corpus_diff, avoid using auto type deduction in for-each loop. Signed-off-by: Romain Geissler <romain.geissler@amadeus.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> --- src/abg-leaf-reporter.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc index 3b951505..1779bdb1 100644 --- a/src/abg-leaf-reporter.cc +++ b/src/abg-leaf-reporter.cc @@ -1308,10 +1308,8 @@ leaf_reporter::report(const corpus_diff& d, out << indent << num_changed << " Changed variables:\n\n"; string n1, n2; - for (auto d : d.priv_->sorted_changed_vars_) + for (diff_sptr diff : d.priv_->sorted_changed_vars_) { - diff_sptr diff = d; - if (!diff) continue; -- 2.43.0 I am currently running it through the CI builders using the branch https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/try-patches. When the builders are done, you should receive an email. In the mean time, you can track their progress at https://builder.sourceware.org/buildbot/#/builders?tags=%2Blibabigail-try. When that's done, I'll apply the patch. Thanks again! [...] Cheers,
Hello, Dodji Seketeli <dodji@seketeli.org> a écrit: > Hello Romain, > > Sorry for my late reply, I was on the road. > > Romain Geissler <romain.geissler@amadeus.com> a écrit: > >> Hi Dodji, >> >> FYI I am having a small build error when building with gcc 4.9 (yes >> unfortunately we still have cases where we use such an old toolchain): >> >> /workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc: In member function 'virtual void abigail::comparison::leaf_reporter::report(const abigail::comparison::corpus_diff&, std::ostream&, const string&) const': >> /workdir/src/libabigail-2.5/src/abg-leaf-reporter.cc:1311:21: error: use of 'd' before deduction of 'auto' >> for (auto d : d.priv_->sorted_changed_vars_) >> >> This patch slightly changes the code to avoid this shadowing case, a use >> of auto, and IMO actually makes the code simpler. Is it ok to apply ? > > Yes, of course, the patch looks quite trivial. Many thanks for putting > it together. I have just added the "required" (boring) ChangeLog part > to it. It now looks like: > > From 9a48f1296154d8f6d5333308f6b2649b6bf55934 Mon Sep 17 00:00:00 2001 > From: Romain Geissler <romain.geissler@amadeus.com> > Date: Wed, 12 Jun 2024 20:59:12 +0000 > Subject: [PATCH] abg-leaf-reporter.cc: Fix build with gcc 4.9. > > * src/abg-leaf-reporter.cc (leaf_reporter::report): In the > overload for corpus_diff, avoid using auto type deduction in > for-each loop. > > Signed-off-by: Romain Geissler <romain.geissler@amadeus.com> > Signed-off-by: Dodji Seketeli <dodji@redhat.com> Pushed to the mainline branch at https://sourceware.org/git/?p=libabigail.git;a=commit;h=2b2fa6ff144dac78b11ddbbb2ae2185f0a670e18. [...] Cheers,
diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc index 3b951505..1779bdb1 100644 --- a/src/abg-leaf-reporter.cc +++ b/src/abg-leaf-reporter.cc @@ -1308,10 +1308,8 @@ leaf_reporter::report(const corpus_diff& d, out << indent << num_changed << " Changed variables:\n\n"; string n1, n2; - for (auto d : d.priv_->sorted_changed_vars_) + for (diff_sptr diff : d.priv_->sorted_changed_vars_) { - diff_sptr diff = d; - if (!diff) continue;