From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 51F123858D1E for ; Mon, 6 Feb 2023 22:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51F123858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 316LVfEm037731 for ; Mon, 6 Feb 2023 22:25:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=WIwl9oiqjttjzXBScfqQiLaOts+Ts0YWriSFNwpaJAY=; b=RBC2ws/rKdcJ26PpcWQdKM0ODX6n3wUVhgEbJTr9nwj5gvs+GBEZ40IDKNZFFAAreIo8 +KLfExEJa7UyAgMnybfsehmQ+Nh7b+vEuYQyXoCc+nDfGvatseh/Q8HZmmNDJQnSXccy QgqokqkfIXVJlG5HZtAC0qo8PRe0GDKRn9fJd5w3+Bj9kgFlZw9FGP8DViGjtDg9HdEU MLFY1rfe8wk666TGbYnnG/ffml6TZIFhEP3PAPpCM4XObQP9dIseUXebNUI+alpLdo6M Cazy+0tQFP7aKn96/Xa8bh/Iv26fr9SPKxivY07tSnbV5B1Gt2aSeovY/tgE3DBz99mH YQ== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nk9hvs4ya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Feb 2023 22:25:33 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3161VF96027110 for ; Mon, 6 Feb 2023 22:25:31 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma04fra.de.ibm.com (PPS) with ESMTPS id 3nhf06t1b1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Feb 2023 22:25:31 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 316MPSiU47776106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Feb 2023 22:25:28 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E5CC020074; Mon, 6 Feb 2023 22:25:27 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9741E20076; Mon, 6 Feb 2023 22:25:27 +0000 (GMT) Received: from heavy.lan (unknown [9.179.9.231]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Feb 2023 22:25:27 +0000 (GMT) From: Ilya Leoshkevich To: elfutils-devel@sourceware.org Cc: Ilya Leoshkevich Subject: [PATCH RFC 05/11] readelf: Fix set but not used variable Date: Mon, 6 Feb 2023 23:25:07 +0100 Message-Id: <20230206222513.1773039-6-iii@linux.ibm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230206222513.1773039-1-iii@linux.ibm.com> References: <20230206222513.1773039-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: R75a2f5Ybn3D9vaSCyoT3JjLcH21Y0w_ X-Proofpoint-GUID: R75a2f5Ybn3D9vaSCyoT3JjLcH21Y0w_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 spamscore=0 clxscore=1015 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=813 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302060191 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,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: clang complains: readelf.c:10250:10: error: variable 'nculist' set but not used [-Werror,-Wunused-but-set-variable] size_t nculist = 0; ^ Fix by deleting it. Signed-off-by: Ilya Leoshkevich --- src/readelf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/readelf.c b/src/readelf.c index f09c5c9b..76ca65f5 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -10247,7 +10247,6 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), Dwarf_Off ncu = 0; size_t hsize; struct mac_culist *culist = NULL; - size_t nculist = 0; while (dwarf_nextcu (dbg, offset = ncu, &ncu, &hsize, NULL, NULL, NULL) == 0) { Dwarf_Die cudie; @@ -10268,7 +10267,6 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), newp->files = NULL; newp->next = culist; culist = newp; - ++nculist; } const unsigned char *readp = (const unsigned char *) data->d_buf; -- 2.39.1