From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 11ED43858D1E for ; Thu, 18 Aug 2022 07:12:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11ED43858D1E Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27I6h9p8024450 for ; Thu, 18 Aug 2022 07:12:19 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j1gda0s4g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Aug 2022 07:12:19 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27I76cVc011649 for ; Thu, 18 Aug 2022 07:12:17 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 3hx37jdh1q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Aug 2022 07:12:17 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27I7CErf23331168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Aug 2022 07:12:14 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADD9542041; Thu, 18 Aug 2022 07:12:14 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74AC74203F; Thu, 18 Aug 2022 07:12:14 +0000 (GMT) Received: from li-75e136cc-3486-11b2-a85c-daad184f266e.ibm.com.com (unknown [9.171.40.181]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 18 Aug 2022 07:12:14 +0000 (GMT) From: Stefan Liebler To: libc-alpha@sourceware.org Cc: Stefan Liebler Subject: [COMMITTED] S390: Fix werror=unused-variable in ifunc-impl-list.c. Date: Thu, 18 Aug 2022 09:12:10 +0200 Message-Id: <20220818071210.12100-1-stli@linux.ibm.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: FvwbOZH9Su0cgSITphruyQ4OhbosaT4a X-Proofpoint-GUID: FvwbOZH9Su0cgSITphruyQ4OhbosaT4a X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-18_02,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=678 clxscore=1015 impostorscore=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208180021 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 07:12:21 -0000 If the architecture level set is high enough, no IFUNCs are used at all and the variable i would be unused. Then the build fails with: ../sysdeps/s390/multiarch/ifunc-impl-list.c: In function ‘__libc_ifunc_impl_list’: ../sysdeps/s390/multiarch/ifunc-impl-list.c:76:10: error: unused variable ‘i’ [-Werror=unused-variable] 76 | size_t i = max; | ^ cc1: all warnings being treated as errors --- sysdeps/s390/multiarch/ifunc-impl-list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index 5d0c73094d..7bee54351c 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -73,7 +73,9 @@ size_t __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, size_t max) { - size_t i = max; + /* If the architecture level set is high enough, no IFUNCs are used at all + and the variable i would be unused. */ + size_t i __attribute__ ((unused)) = max; /* Get hardware information. */ unsigned long int dl_hwcap = GLRO (dl_hwcap); -- 2.37.1