From patchwork Thu Nov 18 23:23:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guillermo E. Martinez" X-Patchwork-Id: 47910 Return-Path: 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 A7F7C3858015 for ; Thu, 18 Nov 2021 23:24:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7F7C3858015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637277847; bh=0Ei0/YaYOaNoRt7x4YJ/D1ajijXRxu10L7Yz8wn1Jbo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=gjJ7E6iMF5J7WeQ/v9acDtN6qjSVQ1ja/ugtJYPCSZZzP1y/WV9w7QKRGlgSdrsdm tXUnAwToL1Fk55Fx3dYrHeUdcdgGWIUTobCTbOzXXA9iB3V0iUWsJfgehSwxpjRusG Eh1X8ePUIKm5vuZfQ09QYUyn9xobqNaS0YYkJorQ= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 9B0DD3858422 for ; Thu, 18 Nov 2021 23:24:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B0DD3858422 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AIMB6lc009987 for ; Thu, 18 Nov 2021 23:24:00 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cd382kw2e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:23:59 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AINKX7k184319 for ; Thu, 18 Nov 2021 23:23:58 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2170.outbound.protection.outlook.com [104.47.73.170]) by aserp3030.oracle.com with ESMTP id 3ccccsjghg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:23:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xe9daBjXymKmGhKADyrIAqxZUHVg73looCoGplY/UTJh26qTsJlgSaXwynxvFVw1XAPfKjzityNWAkYj+rQ7P+m1d4uP8uQTlcEUx/UBPcH8KKtQ25X98RpHYNI/2myR9hZXDSwW/yrXPr6oX1oFRNe1yKNrPJEVcOfKcLZl7JNP3VuEbghxbrn93IsYuR7Tls5pdQrHivmcgU6Y5ZwOLjlfpaYKEq2PizzM1sC6G24P7fz3LCEBLy4gblX0rLoTl91KVHmAVR7iCv7LfviM/uMXdqXetqlDD4TsXuZBO9ViWGXOMBIpqmj1YmjgeLt01z+LhFhxbMZwZZTEPWpGRQ== 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=0Ei0/YaYOaNoRt7x4YJ/D1ajijXRxu10L7Yz8wn1Jbo=; b=hsRFVNJy5f1lI5DyCGyeo2k+JjJjFz5b+A50Y+LaY/rXKudxjGGTeswd+cOQUtX8S2A9cRy1IFj2HqjS3EcnuOUBvelhfjfT7JRIBPaKG7KTYzmcWFrc4qFhU3ZT+bYyGBfvHVdO9tF2YEnupBJpPGsBNMdg57MSnBmLkXGsbaOIrLmbOfUD7iFGjRHCZ58HcnbHxmLEQxy6kMP4j/LLIVvWA8bs5+i5CNdefAXV+6kye64HWjBy9P8QCQEr/p0bT/nBI48AvaJBeSaVs8bjNeYQvGoQ+9mZixpL54JDuBKNppcyxNe9zhwwvM5IyG3iyvkN1R2ouh30UTeiI70PRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) by MN2PR10MB4045.namprd10.prod.outlook.com (2603:10b6:208:1b7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Thu, 18 Nov 2021 23:23:56 +0000 Received: from BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765]) by BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765%7]) with mapi id 15.20.4713.021; Thu, 18 Nov 2021 23:23:56 +0000 To: libabigail@sourceware.org Subject: [PATCH 1/3] ctf-reader: Use argument by reference reading the context Date: Thu, 18 Nov 2021 17:23:28 -0600 Message-Id: <20211118232330.16310-2-guillermo.e.martinez@oracle.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211118232330.16310-1-guillermo.e.martinez@oracle.com> References: <20211118025606.554809-1-guillermo.e.martinez@oracle.com> <20211118232330.16310-1-guillermo.e.martinez@oracle.com> X-ClientProxiedBy: SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) To BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) MIME-Version: 1.0 Received: from sali.us.oracle.com (2606:b400:8004:44::1a) by SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 23:23:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da1b9595-ea48-4504-75ff-08d9aaea7dc8 X-MS-TrafficTypeDiagnostic: MN2PR10MB4045: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: npNcqVHsWZA6fBcAvS7VmJfUbZ27isommz9CuXLPOxFrh4Ik7slvvXOkHdmqpxRmt4mQ6b593cJh1QkJiLbbK5xUpyNBoqzTHQAxqXzG2SAzLLFyj1cIp13orN042kAt6GXrmiqbavVkIfp8sBZNuyJPhVyZH7RSNuXXRc6tF01eoGGVVlHBtTf4akBpRADyiUytQoPdq6D7hEaj9rMThJjMF4SOsVYMtAWB1sVDJlchScA+H6jor1+j15oX1ZrecyO4ZQUz/qMxh44tXLGeZRKjctYSOhkzXNF0QocmspgAC51iSJEoqwAovGVVQ6YlqUFGS6zhm1T7SsruKaUKtWPyh1JsXrlhpIwc16Xi8osdLrkdS9bOU6fjFzoHbGCs8wHZo6u36+bLly2aS/PfnoGDcbCHMi2x87zZJDy7AUhrRdX8+WuvRcaxuxA08KTX13SSVqePgDWrJXL9msUcyIa3Czs1zTrP5vx+Nq1GL5jCd3pnjdBkoDngvwFFn49XE98RkBwJKUFA76XPT05eqMNVWlLdYneDv35IMBvhW9DL9SgCF2tDqC3rCwt2jhrAlU/1LRTChctED4yE5BEaJ/SGzimEr9H9AqZnsJSrcmw8ouhl0QiC4sXja2vajds14t4HymwYTMkcyCSyg0Em/w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR10MB2852.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6666004)(6486002)(36756003)(107886003)(38100700002)(83380400001)(86362001)(5660300002)(52116002)(8936002)(8676002)(7696005)(2906002)(6916009)(508600001)(103116003)(66556008)(66946007)(316002)(66476007)(4326008)(2616005)(186003)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fQnyGvb754qdgTRQtSSUbP6yBVmcPe5hu/vo/0yMfFdhaxbU4nq4SZaxyGQ2l1fR+EJRs4umsyY+mWa1McTrQ/vyKSTT35UqVOQLbombTGYNL6+Tnp3FnDo6E7wmnmrwGU9ATorNWjVo+pAfi/4mihJ+48IFANxhJ0+wUv/GTBcMCFLD8ZhUTASCWymRoENepjESn02nkfx9Pny/jyRdhfh6wnHe/T8LC7rWGDTIx1sn+T77CS9Xa4AS5bwFISmvt0swEn2yrZ7psMZX5TGhL4KnxlAoyt8ORfMFNISH9JmxQuMWHJcAfuxweqMiYA656J1Odpv3/FO04rrHpMzqrhTPc7cVFKaNsKsPVsq3/zbCFHrLyAF+YZgpV+PeE55GAdflnYeJoBP8xe/F2ArVg8C+5hvFXB7A+uUM1fm2lK1FVsM52jE5bDp4oBxVLuM8inQVCe3llHy1yX15NVwNEqv967MY7M3gpxs1yvKxwL8UCfP9edV4uDDgW1pwBv5bMSS4s6WYRh+h9BBO8jJhxfgy+tSAm55N649dR75We/YTeWvsY253oDSNShaYheLDh+tvHs+sVYsv5UuG27qGhlYRE94QQekxcapG/htMmpNwcBS9eJ9X9SaEcvKVdDPDlizMSAaOdCDg8wu5n8AP1gHPkwcOWx5LYGbuhbKlp+cWav0wUcy0lmoe4y+434JRgAzIMFcWlN7SMHFYA3Uiy7rhEooaj7oHuaEMKVsMO20yWCw0EgLW+qsyl+DckJtrzQpLF5IAfqzWktQR0bep+IX3Kk2AyiO21OAyr7DNJRrR1tjkpxzDY1SfqCKxJhJkJLQskPA9kypc4WQ6ELdNqN8BPwZf6yQRDVtVyn6qvgy2q/DUfBZe6g6ag/7imOR39af+6QlXRuO+VfKQHdmq1Tw4fawsfYXNv+FKDw8IuYc1dpVf5xtB3wcvSwj16RukW+Et6qEJOIy/jUcRk1Ol9Ob7MdiCyS3N4jV3G1099vtoDs4kr+I45UkJ4OpfMUYFP1j5muXWf8r5VN2yBMnWz74FRLFOZO5r7TrZ0V/IgNNpKv/1D5zGh/sj9VqHPRvd+oyXU9ZmD6Lz+JDt9dQfQB2tqeGzqxiYlFi2o0hYhvDfIvL3/plZI6is08W0tURrPJJWa5Pank2kwhwjl2Fly8SPYqb8arRqvFCum0pwCleyuJDJntsiX2f+1F8k3d/2PQiXBMvad79lCk1P4aW6XFHsswXF6ieqDtBcxhOATKRY2OvjurtNh3WcSlfNjsaEO4DAMmCcHiAZuXRBO0RRMYP4lOZb+koIleMmVAThN8VwCV/a8VrV2vsktgS95VjKH8zs3M3w+GKo73f4eaj0fNZFqA/pnU2mmwWofpRZPkyNo9lEXGB2yadcHSWJQm+iZbn1j/I3xhJBe0IJQQ0d8BbMeBOHrHYnOINIdXYzBSseikNHK8P+eKgjj6oiC/PDe8XT8EUq4CiYlF8AdADbXKk/02dYnzEmaWrMhctq9aRAb/YHM+W7t2jRzihZbtWP8X08hmdsRbMBW78fF5EkeXEL2sXYFPA167aUYsxd8vOV3R3rpFvwRD1cpxJf72h2po0iSfP7CKUo4vghTbDfULrtR4oCNnLLMpS99XanNfu4+ExcRhwIe9Evf7+0DbS0kBEfJODIjhfN0lhZWvQ4ASiGZcSyddgMInNcYwTEkO4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: da1b9595-ea48-4504-75ff-08d9aaea7dc8 X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB2852.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 23:23:56.1692 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DCOsk0m9qPP8LrJgQxvDvWB3kWUJfvvbyzPU5k4EEdYLU1EUDO/1gv2ek3kePbZy35f+7Mm/oE+uuQgeEFdQXStfGM5uL7s4/7PoLFQZPWI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4045 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10172 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180120 X-Proofpoint-ORIG-GUID: Qev2BteU9RJZbqcVw0kGmCjtSNVl8_Ld X-Proofpoint-GUID: Qev2BteU9RJZbqcVw0kGmCjtSNVl8_Ld X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Guillermo E. Martinez via Libabigail" From: "Guillermo E. Martinez" Reply-To: "Guillermo E. Martinez" Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" * include/abg-ctf-reader.h (create_read_context): Pass the string by reference. * src/abg-ctf-reader.cc (ctf_reader::read_context): Likewise. (create_read_context): Likewise. Signed-off-by: Guillermo E. Martinez --- include/abg-ctf-reader.h | 8 ++++---- src/abg-ctf-reader.cc | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h index c0d8bb2b..56b2bf91 100644 --- a/include/abg-ctf-reader.h +++ b/include/abg-ctf-reader.h @@ -25,10 +25,10 @@ namespace ctf_reader { class read_context; -read_context *create_read_context (std::string elf_path, - ir::environment *env); -corpus_sptr read_corpus (read_context *ctxt, - elf_reader::status& status); +read_context *create_read_context(const std::string& elf_path, + ir::environment *env); +corpus_sptr read_corpus(read_context *ctxt, + elf_reader::status& status); } // end namespace ctf_reader } // end namespace abigail diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 0370c8aa..2c2c204d 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -102,7 +102,7 @@ public: /// Constructor. /// /// @param elf_path the path to the ELF file. - read_context(string elf_path, ir::environment *env) + read_context(const string& elf_path, ir::environment *env) { types_map.clear(); filename = elf_path; @@ -1060,7 +1060,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp) /// @param env a libabigail IR environment. read_context * -create_read_context(std::string elf_path, ir::environment *env) +create_read_context(const std::string& elf_path, + ir::environment *env) { return new read_context(elf_path, env); } From patchwork Thu Nov 18 23:23:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guillermo E. Martinez" X-Patchwork-Id: 47912 Return-Path: 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 2E9A8385801A for ; Thu, 18 Nov 2021 23:24:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E9A8385801A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637277854; bh=rJC94ql9kTcPYHCzY6/ujx5Y4byimilPqriHfOEA+Uw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=VdBbq8Imd4QPE4tR8GZzJjgCZBfn3vrb1xT0kavzy/NX0ANKb3xF2K3qSKWY54k1o k0LgPu8oxJwrdI07kLs7hw9YY6Pt1BaJmhPFLQrAPLQnusqADh5LtNF9/mHc7/nvJR PFjsG8lFW8CkDSo8PloXamzzh4jAUjsCo2upXW+M= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 9A2E2385801D for ; Thu, 18 Nov 2021 23:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A2E2385801D Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AIMB6le009987 for ; Thu, 18 Nov 2021 23:24:01 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cd382kw2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:24:01 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AINKX7l184319 for ; Thu, 18 Nov 2021 23:23:58 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2170.outbound.protection.outlook.com [104.47.73.170]) by aserp3030.oracle.com with ESMTP id 3ccccsjghg-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:23:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cvNU51K6LtbEzkW6imJRakQqmPfw7EFWpYtFNA5xyRF448Th4m3JeZlD/jfcUICoLRpPsDBTJyi+Xv3kShCSksv7anSmDkeXRjCzwh+DsSYJIPIw0YENCgxPRs5fHKkWAHKGggOVd5Wu4TRVqaW1dpDXIIXU3Dk7EW8REZrqkHLT0Qgs0VXeUNZ+q92Du9/MSzXi3CxrWC02dYZmci7/oGu55szI9hCIx2LVylmOMHhLpdXyoQHuhQCiuQL30ifKjvavaDm2tc5bUqSkJnH7NHCD1XpF8aLSIdBU6hohLpG9sl19OgeNBMg2QGn0mzBXU0YyvscY7ZKV0JOIQP+aFg== 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=rJC94ql9kTcPYHCzY6/ujx5Y4byimilPqriHfOEA+Uw=; b=EC8NEfqkJzdFIRLzpJCY0lzZVe0nK85+DF1+p3uTwK1UFLCn2nBS8QWHls9wlGEGm6yZsfbZzf11w6EzYR4rt+sZXB4yGdwWGrU7tpIvmac2w7PT756Cpid6VnGoUYAem2HgQIs14K/OBTq5HXEz0AkWM7BwXvYRshGu7EW3BUKWSesaYh9N85ryNEJ3mOLKnXdN44CDHdVhjH24MDP8BY8FF+ZU6Fm0PlB14LY7oXq5h7w7m3dCCkUWmTnAWt3DFTtZ55xqwH6rZsoKFHsunoxDTUNWHTot1CdkhYYRA6yIOzSNNBFuhQk1AqxjHEaUO8bskVfMG2U+QGBqSnKibg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) by MN2PR10MB4045.namprd10.prod.outlook.com (2603:10b6:208:1b7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Thu, 18 Nov 2021 23:23:57 +0000 Received: from BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765]) by BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765%7]) with mapi id 15.20.4713.021; Thu, 18 Nov 2021 23:23:57 +0000 To: libabigail@sourceware.org Subject: [PATCH 2/3] ctf-reader: Use smart pointers in create_read_context Date: Thu, 18 Nov 2021 17:23:29 -0600 Message-Id: <20211118232330.16310-3-guillermo.e.martinez@oracle.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211118232330.16310-1-guillermo.e.martinez@oracle.com> References: <20211118025606.554809-1-guillermo.e.martinez@oracle.com> <20211118232330.16310-1-guillermo.e.martinez@oracle.com> X-ClientProxiedBy: SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) To BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) MIME-Version: 1.0 Received: from sali.us.oracle.com (2606:b400:8004:44::1a) by SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 23:23:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29393574-070d-4f2b-ed69-08d9aaea7e64 X-MS-TrafficTypeDiagnostic: MN2PR10MB4045: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:220; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k3ViNa+TCm3karFRDglwpi/KcyWtHhS3Jm1TT4e7JQSeSlMSmLyJQ4gJNg1QIhNRpUX8t2JnD4W1YY4PMOKtGqleJNp4VXG/8ch57R9xMj7bRzTvT4CroivLimAk4S8bfI/srG4mNQ6VgV3LdW0e2aKkGnMO22EtVBQpp9UgT64ee8DBgxpN/id8qeN93a/IL0McrKwv4iYQ07/sdfRaoFX9A/eWMRvYPQ/tPrqQyrlFVWjRJoa20tH3hXQDmUSdFjzpMR5nZ/jbHQwhpL3Dh0T2ZGQO+ZePA2IDtdknGsYbpp1aXk1tYMT4wrQCeEcypwV6135WXgE4WjONBbylNZiqFZ5GmDvg+5apeQTDixG6P19jnE5zkEiW7q8NHWgVdiuRXSBVXXEhkPy7swS7HbC/1SjU2xFDx2G2KNtTj8f+4yoyrKBKybzl+tYWNWZ8K3PdYlmy4UbBWF7Di5Zb7Px5RVoJCCkQK3nTbgIMINlJ7/BFqBGH6NZBvJPe52BQENBSW6Ze1y28iTaA9iOzvYfEqhb7W6uH9ZMPPflO+/yju12cnZdLhpxQkFJZJMLl9lx2sprxuDAiWFzJLl5Doa/1EWyKQq/oGqSldhUvWvyDrYUtCfFQJp3Ca08ItHg4YsKgCLDQQ54gyFb5mhTYSQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR10MB2852.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6666004)(6486002)(36756003)(107886003)(38100700002)(83380400001)(86362001)(5660300002)(52116002)(8936002)(8676002)(7696005)(2906002)(6916009)(508600001)(103116003)(66556008)(66946007)(316002)(66476007)(4326008)(2616005)(186003)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /pwFXt7DGje7O3SizuyggDM3e4aOyAWa913ug78EskZAQrbsjc/vn48roHBId6+EESN1F/u4kSwAGbjJlzYSy4vt89JsRcd1TlPvjqZft268APNs2XW2cM3nxje/GqAr/C3vOXM2s1ji+vQ054oR+xop7o08D+G7EE7U67VMdA5kU1JCPZS70iN58e8y5y1R/117Mni3iP3NJlmq5wcFd5Hg1j3nmEVgljwWDfTFHCKcUXb99xss5iAr0PTl2aYhVaGAkdBmw1N4lJ4w8m1UQNJdIfKHxoFQrSqZukrhGGpRz3DsxHrc60AuFSc+4jplSckAQVJTkeuvhUYTcAa8SR7JQtEVnW/yY3BxXCkmlRoOLF/BIyigc6lgtwTDmO2+5LDd0vL9SSvxVMzTJpfTtdIVwclJSemr/7x/DckuWDXGrBF5a6XTuwJrP/mLMV73ZryDGi6bnjBz5Nq/hfp9S6gwvgChZvedXC4+O8yXHaiMeozquxSfTyrHhTf86zJ1z9x+NpxoftFEIZYiavUjCakTvBhHpYd1cnRtsEBUN0SgETy84NYHQbPElZPqtPT0CMw9N+GpCmh1a6LfxQOcI0KGnsdlc5JlL+TN/5Ebofectvj4HAZ6YL6XQZHYbpKQjMFFeFWFOx5kLjwuV/ZAys3A1RFVnic6pCU1C/6ATQxOhADLGNF4bFBQBI0xb4IW+QgTCIb5a4HuNSG7/f/8O02c6Jydru82Oxa5/yYPJ671s5h6fMyNTGvP80nNujv3+R1K7T4R8QlMpaVkRNyc2l1Yb4/2ksSY9c8Nl8D0BU3dD2Yhs5Fwa8wrU7ukZa+r57cqMe0u+s1VMg0FPL6LVahUxtuU1KFAiU29njr/GEC6/Xd3r9fweOs4bzqpJE9P54QCReE6Yom1AlElJSBswmaHjcDOaLRHY9Yccjwa3ZSE6LyXeCNBCj6LOB001LeR14K+FaO+HJ2buMRELvQgbAdtvQ5hE+RuNp7HCy6IExwAn9ur1W8mmo3dK7JA6lyXFWWa3xrIzn9IkoUmBwc3FzGrPunjcbl/GeZHcDMGnSnfVOEp6pp65iOcEVSaqK4NQr9Fe8fmBXJiD0wKZ7UADE+gbglgB+2yX637NHq4rU/XrvVLtS6EaVcM7ivHBErvThcvFpCVpocmTu9HFZbKw9FZOKvZ4iH142v0IwzQ/3a2o/KTKDVXOAk9DzaPjN9ntvI2Ui1DBPJ+OArJh2yJrvEGPW7xYUH48XiaylqcKdtsp7fIJ7tFn4It4QSTSDcFcnwV3R68bW5tJ2YO5CSE9Z4Raiy+4HuzGUROo/qBemD2jmM9E9LtdZOWcuyBP5wipu7t7MCqkQBPwA5kWxlibuAIBVMetMAM/ZqLNpm5LeFdOjCfbQQGqBLLmFNKky5jWgDrMqrlfmZXL9ladrUROITSL4F60T1elv5GtnoS4MgJPwpvM2Lg+J3r+11f5oZ2B+yfkKpiCYYEL8SFciarbiiqO8vg0U97bE9lscOsf4O34Eu6cS9Yu4AU8lyCbDb3cSzro6CWaDGJEIdrN76r+hrpnyoLTtyUJjPPWJhkNvEN3T4WlLQxj2T4khou1+cXvIZ/cBfS8EX5819u4MNmhQwfkPKR2Ec9Rzhba62Z7tnoK0n651wRDRoM/rItVxmnkPLj/qtONzKeo0nCYv8jPfzqpyRg1jYrtkGj0qdRZ0o= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29393574-070d-4f2b-ed69-08d9aaea7e64 X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB2852.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 23:23:57.0867 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qQ/oK3si8Glq9IyGltoZF2HyHHYfNh1dsDEVKhIV4d+T+f2skMCeQUewBCzg6+h+ohEcGzrPw216pxI6+byBISxO6ATiCCoxz7plbQPLhkU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4045 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10172 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180120 X-Proofpoint-ORIG-GUID: GCo1G2VRsaZrLLcD9CgKCnUWio-4Q3o0 X-Proofpoint-GUID: GCo1G2VRsaZrLLcD9CgKCnUWio-4Q3o0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Guillermo E. Martinez via Libabigail" From: "Guillermo E. Martinez" Reply-To: "Guillermo E. Martinez" Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" * include/abg-ctf-reader.h (read_context_sptr): New typedef. (create_read_context): Use read_context_sptr as return value. * src/abg-ctf-reader.cc (create_read_context): Likewise. * tools/abidiff.cc (main): Use read_context_sptr. * tools/abilint.cc: Likewise. Signed-off-by: Guillermo E. Martinez Signed-off-by: Guillermo E. Martinez Signed-off-by: Dodji Seketeli --- include/abg-ctf-reader.h | 7 +++++-- src/abg-ctf-reader.cc | 5 +++-- tools/abidiff.cc | 18 ++++++++++-------- tools/abilint.cc | 8 ++++---- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h index 56b2bf91..c527c2ff 100644 --- a/include/abg-ctf-reader.h +++ b/include/abg-ctf-reader.h @@ -25,8 +25,11 @@ namespace ctf_reader { class read_context; -read_context *create_read_context(const std::string& elf_path, - ir::environment *env); +typedef shared_ptr read_context_sptr; + +read_context_sptr +create_read_context(const std::string& elf_path, + ir::environment *env); corpus_sptr read_corpus(read_context *ctxt, elf_reader::status& status); diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 2c2c204d..3e17e049 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -1059,11 +1059,12 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp) /// @param elf_path the patch of some ELF file. /// @param env a libabigail IR environment. -read_context * +read_context_sptr create_read_context(const std::string& elf_path, ir::environment *env) { - return new read_context(elf_path, env); + read_context_sptr result(new read_context(elf_path, env)); + return result; } /// Read the CTF information from some source described by a given diff --git a/tools/abidiff.cc b/tools/abidiff.cc index f145f4f1..30959616 100644 --- a/tools/abidiff.cc +++ b/tools/abidiff.cc @@ -1169,12 +1169,13 @@ main(int argc, char* argv[]) #ifdef WITH_CTF if (opts.use_ctf) { - abigail::ctf_reader::read_context *ctxt - = abigail::ctf_reader::create_read_context (opts.file1, - env.get()); + abigail::ctf_reader::read_context_sptr ctxt + = abigail::ctf_reader::create_read_context(opts.file1, + env.get()); assert (ctxt); - c1 = abigail::ctf_reader::read_corpus (ctxt, c1_status); + c1 = abigail::ctf_reader::read_corpus(ctxt.get(), + c1_status); } else #endif @@ -1252,12 +1253,13 @@ main(int argc, char* argv[]) #ifdef WITH_CTF if (opts.use_ctf) { - abigail::ctf_reader::read_context *ctxt - = abigail::ctf_reader::create_read_context (opts.file2, - env.get()); + abigail::ctf_reader::read_context_sptr ctxt + = abigail::ctf_reader::create_read_context(opts.file2, + env.get()); assert (ctxt); - c2 = abigail::ctf_reader::read_corpus (ctxt, c2_status); + c2 = abigail::ctf_reader::read_corpus (ctxt.get(), + c2_status); } else #endif diff --git a/tools/abilint.cc b/tools/abilint.cc index 49643b66..2e9bae49 100644 --- a/tools/abilint.cc +++ b/tools/abilint.cc @@ -370,12 +370,12 @@ main(int argc, char* argv[]) #ifdef WITH_CTF if (opts.use_ctf) { - abigail::ctf_reader::read_context *ctxt - = abigail::ctf_reader::create_read_context (opts.file_path, - env.get()); + abigail::ctf_reader::read_context_sptr ctxt + = abigail::ctf_reader::create_read_context(opts.file_path, + env.get()); assert (ctxt); - corp = abigail::ctf_reader::read_corpus (ctxt, s); + corp = abigail::ctf_reader::read_corpus (ctxt.get(), s); } else #endif From patchwork Thu Nov 18 23:23:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guillermo E. Martinez" X-Patchwork-Id: 47911 Return-Path: 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 C60953857C43 for ; Thu, 18 Nov 2021 23:24:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C60953857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637277850; bh=i7TircmPgLVgow6aDBRqSG0oA9jIxzAR8hDUbByoGzg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=SxBueN1Hkb66nZQXbc/HV7mfNizLAda8M5Zn0qa1x9qo2WxlS4GqBOyNpSG/FdZFz acKCDJxF9DxRHHaZXaCRY8RK7L4+R0+crfmqwf+fYGFDA3mQ0cwlaY+IuhKnWLoev6 I1u1V01/CznunYYluLbjIF//IUghiqLw56aYdRjU= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id E53CC385800F for ; Thu, 18 Nov 2021 23:24:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E53CC385800F Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AIMDE8x025634 for ; Thu, 18 Nov 2021 23:24:01 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cd1w8bh8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:24:00 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AINKX7m184319 for ; Thu, 18 Nov 2021 23:23:59 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2170.outbound.protection.outlook.com [104.47.73.170]) by aserp3030.oracle.com with ESMTP id 3ccccsjghg-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 18 Nov 2021 23:23:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSljTc7hDSedTcruKXR0msADNeTS0fvkRUKmWuPumtwfyvGsQqhGFCR6vMXIPdQw0l82R2jtPAD7S4J99vl2QY0pKFvdiCrPinfHxm5UKSF9WevdtIGJOjadYQzR5CYIXlUeoFhcFWXb1r6AqlJ4Pq9IUSZ0GswdRza/goO2dAFek6aRV0obUBGYtr+1h9E4yPWvk+C4PKrFOKdMSBezVo9esr5VWH1VLFBPf0TzYNBCUkWOo34yW9fnMlOqKBjHNl8TvX7Vr/qirCBv2Xrp6YSI+1S+6lBUul1neKdTaVp8biWE33eL3hQMo0LD1xOsG7eSjPslxZnokc5s+HGgrw== 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=i7TircmPgLVgow6aDBRqSG0oA9jIxzAR8hDUbByoGzg=; b=dpDNc8jGEKCdXL0L1RYZsxDmzYpPPNpCpmvTZh+5ugqJWBQCJTs9/QIkBnZkPd60e8J0NOsQkkTm35PLQatE8ACgAu1NsXjKTWNnC54F0nFXMOv9sPZoXGIeCoQBAK/q3poxhMWo092klxTJso4zcDeVo3qnM3JZMuKN9W9DT5AzSGru7oxeD/EU0eUJBLG7yiiFcIbLkYtp2NPSOBWGnRnVTmxotBBHJawu1iGiARxLg3TbkdSGWyRuTlj0Cc/KCNB4+wR/++jn209x1DxuIT2zuTPF0x3j8YhIvx3wSGP5V4GBWlNtjl26e5OLQm2v9XmaRn7/ZyhjzNvud2HnDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) by MN2PR10MB4045.namprd10.prod.outlook.com (2603:10b6:208:1b7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Thu, 18 Nov 2021 23:23:58 +0000 Received: from BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765]) by BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765%7]) with mapi id 15.20.4713.021; Thu, 18 Nov 2021 23:23:58 +0000 To: libabigail@sourceware.org Subject: [PATCH 3/3] ctf-reader: Use ABG_ASSERT instead of assert Date: Thu, 18 Nov 2021 17:23:30 -0600 Message-Id: <20211118232330.16310-4-guillermo.e.martinez@oracle.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211118232330.16310-1-guillermo.e.martinez@oracle.com> References: <20211118025606.554809-1-guillermo.e.martinez@oracle.com> <20211118232330.16310-1-guillermo.e.martinez@oracle.com> X-ClientProxiedBy: SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) To BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) MIME-Version: 1.0 Received: from sali.us.oracle.com (2606:b400:8004:44::1a) by SA0PR11CA0189.namprd11.prod.outlook.com (2603:10b6:806:1bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 23:23:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ee9a973-7415-4374-2943-08d9aaea7ef0 X-MS-TrafficTypeDiagnostic: MN2PR10MB4045: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:68; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A2gNDnT//p61Cw1LL118bgLXQ+01uZiIpHG/dqeJRRJgrq19vITGq/60BLo82XG3TgBB4lShFkLnpSWAKgtGaB7rVkhKc9uhx53SxiqFR8AN1E+CcL/rQwfqkWjbQihTTeNpYghORssLBQ3dzxa2l4/TZtN8J+Y44LySDmYpZpcYZqD/II1wetToEh761J7aFTwvqoFsBDOBv3okEJPcaNPfzjM5SevG2AkkaYrGFIGPFh3o97pBmPQwDjDMzeW4gDfxaaJzWya/W0TbxwYJjWz4iiTEQqtbIMjStqen3DXbv8VazBjgaT6cDt928ugrrs0UqAHXmaPmkp4xmVQ5bxpWWiVsVQ26ap3aA3gw19Na+V8QS9GeY8RipOHHtGF9dkoj62BDL3MnkCAGQIasFU9sznnddoS/dIfLFyIgTJgXx8rB4imLyYgsygX6s35Oc/kLUI13Te0tHEdzby1fw+UWrnQqED08kS33IKhuoavcitWMwoW36ZgxxaRpp4Gy0V3Sm8XMwsljIXnYx2KNpBFPd6fz9VBGnFdEKPwo7MOhQbV0eNEAo4gZdozmcNB8MU1cf4+SgJ27T9XjrmgM2ax/AOjoKd1gpwERDblieySzO30JXk22u3WO/A1E9Rd5t2NIW5QlSBPoesUQAHz5zA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR10MB2852.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6666004)(6486002)(36756003)(107886003)(38100700002)(83380400001)(86362001)(5660300002)(52116002)(8936002)(8676002)(7696005)(2906002)(6916009)(508600001)(103116003)(66556008)(66946007)(316002)(66476007)(4326008)(2616005)(186003)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RI0fJXCVWZt3A2jC5Bu4tuFgcoIqW6Fb3FO7gVt4iEy7fNVQQN/l6R1ph5s4RaoP6cCmj2v2DCmp2SqfGVeKeBxP2UMsF3hFwk4K2LEhP7DbkTc37zAJtZB8KJ5Tc0HeAj7Zqv2YHPeWSuhlNCEsFRY4NDybHOJVVcsDcB0csQiEfiJy79oh3orToh2N1EvKRva4BtiHhDzUte1I3GajxTdBc3BUzFroM9Yxxc3s5Tnz9FA3s2/JgPCqXuFNafIyiPFrqsNDe4Gg57j6JANH+N/tGB/7e/Rzuzn1YkrqLv75jry19RPxSBDm7r/0i1DuYPW0t6lkUbuw9QXcuApNj8nr3YBKECBqk/QhgOhBXZX62mb/p8z/7KDtD0rMBQ9N769CAqTQJ92BLZxDtl/smVsNtsVBHtQCTLrf0z91kNJKK6ZhP8zPLwtG/gsWHrz16xOeccWFeEugoUq5JVRqJh0/vUlQa51MyDwq2B5yRLtviHLZk8oIfbS3Sk6hNAdoDrAJwsHs04pR+NgXZbwL9vINSPwBKrBP2aO3ZfGZJ80JrBk1taqveb4htGykQQJKzjGYKLP1wy6eoqUkcD+66U7/NlVD5O6azuMkiBNlg6naaOrsJ7lK26fawlQKjkxsudNV8Ogruwd85kDhmixIbj+x/KoaBfrEPDi3veOiZwVXcVjRwglCum44lswzXW3MaKr3TseDfjI4WGRFCui29ldvyW3m2EtzGYcg99dE69XuVO2D3UdIPWk8kfn91dT1tbP68/yYn0CDpYfnmtp5ZpzbR90MMEAXBinm0XhytdRdHBTpTjaMDJBkCy+/PHxNY5F9vO+tbJCDEf+VK36z6SJRbtc1wZ1voOX6CSRSIK1qEaUvel++OCM5+hnZkuQK6R/gFpT14NyZ3CuzuI8Hpjc1OQ3RtqTyfP08ub/1HeqIRsBCd19xQLRHq0MAsYJA0s6/pYOjv0XaD+N8x34gjUP4iKBbtVgFB2dL9gPWi73wSvVPpivAc8LUdAY87gbG6xt4N8OyU4E/OF+h74zoLIBPNuOM0nAO8QKOGPiaugTwEHu9LmmtNR9d+N+eU/1xPST4V5CXJjQegT9YiJT462szhdTaOWajgeL8Jrn+n9tKUsv8Pb66MuEfqsOv9NiWqXVq+ymmZIpiI0dVYl0a+0fc/BCluxqAv9NoF3ytk1WA6X+uofbE66vecfueaEbG85QqQsSlMVtKBaISFlPSM7UPFASjfwvvRpEqMIUI7EeO3ORS6CPyLljAEOHperW4z5EHqEnVBLiWTkPBVv9seOGw8b3eOuw52HiV6R+L1zp424d1GlNyBq5+WRxcEnbvc8AAXjuJZ0c9DjcF/Cg3XoRfnv3MOPA2fKXF7eNEXkIN1xfGELl9qWt7YRa81aMZVOmbknqHM9GxyKE/hwnisUrewWW4xSt5fx6ox1UEDCA1ueOGYz5/gLzoIGw3fr6u0ImTQ/csjdlLRa4nnwE0GmQFNIkkt++5bKqju30hOYwZS6iTvAGSx9HJgThqF0tcYC+7cSk3YHgchYH+VoCWosnEkym9UKg198iWudU5WFxigophmGFTEp7ah4gbEaeavGC1FZjz1xZEzANF6Q+6Uv5asdCtznBxW9njZn/lC67RJNDbCk9ETR2xU0h+ItxVCZwPx0Z9LsCrfsebOh3NNKwPr3i2DgNGixUJOflgi1A= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ee9a973-7415-4374-2943-08d9aaea7ef0 X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB2852.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 23:23:58.0552 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DKH80QcsnHDO0EKthL1ULHw0OxbnXaNASv8EvLXUrwS/tmY9qWqwcd/fhk0CTP/izSUnhFhbmikspvsnh8vCX74s8ifRQ5N6oULHA61P1vY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4045 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10172 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111180120 X-Proofpoint-GUID: mJVpy8KYKlz_5nJqxGNzCWu0C37LyhoL X-Proofpoint-ORIG-GUID: mJVpy8KYKlz_5nJqxGNzCWu0C37LyhoL X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Guillermo E. Martinez via Libabigail" From: "Guillermo E. Martinez" Reply-To: "Guillermo E. Martinez" Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" * tools/abidiff.cc (main): Use ABG_ASSERT instead of assert. * tools/abilint.cc: Likewise. Signed-off-by: Guillermo E. Martinez --- tools/abidiff.cc | 10 ++++------ tools/abilint.cc | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/abidiff.cc b/tools/abidiff.cc index 30959616..779fa18b 100644 --- a/tools/abidiff.cc +++ b/tools/abidiff.cc @@ -1172,8 +1172,7 @@ main(int argc, char* argv[]) abigail::ctf_reader::read_context_sptr ctxt = abigail::ctf_reader::create_read_context(opts.file1, env.get()); - - assert (ctxt); + ABG_ASSERT(ctxt); c1 = abigail::ctf_reader::read_corpus(ctxt.get(), c1_status); } @@ -1256,10 +1255,9 @@ main(int argc, char* argv[]) abigail::ctf_reader::read_context_sptr ctxt = abigail::ctf_reader::create_read_context(opts.file2, env.get()); - - assert (ctxt); - c2 = abigail::ctf_reader::read_corpus (ctxt.get(), - c2_status); + ABG_ASSERT(ctxt); + c2 = abigail::ctf_reader::read_corpus(ctxt.get(), + c2_status); } else #endif diff --git a/tools/abilint.cc b/tools/abilint.cc index 2e9bae49..efddd77b 100644 --- a/tools/abilint.cc +++ b/tools/abilint.cc @@ -373,9 +373,8 @@ main(int argc, char* argv[]) abigail::ctf_reader::read_context_sptr ctxt = abigail::ctf_reader::create_read_context(opts.file_path, env.get()); - - assert (ctxt); - corp = abigail::ctf_reader::read_corpus (ctxt.get(), s); + ABG_ASSERT(ctxt); + corp = abigail::ctf_reader::read_corpus(ctxt.get(), s); } else #endif