From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1105) id 4123C385781F; Fri, 17 Feb 2023 17:24:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4123C385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676654652; bh=3qRF2PB69Md82ssOiweJyctRq0HcRwfUC0brqTR5O5w=; h=From:To:Subject:Date:From; b=Ve+Ivgxbh38rYHWcJTXaTsl3acxA7MCXRjpC+0IUdbf0ux6yl6zMLlxZGGRDJjN/+ i9p7pcllt/noDCrnT99tWUnjm2pCtZdcbIaLz2rewdfAH9S5EOH6ObqeOLN2bWj2Zt HSSiK0PtRPUc41cblbAVUPjnqvLaBCeUipAZZ3qU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joseph Myers To: glibc-cvs@sourceware.org Subject: [glibc] Fix ifunc-impl-list.c build for s390 X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/master X-Git-Oldrev: 26c176950909d60ac2a392cf9fce70eabd75f79e X-Git-Newrev: 609054152fd77c9b572bb04c4af2f8da1ed0c86e Message-Id: <20230217172412.4123C385781F@sourceware.org> Date: Fri, 17 Feb 2023 17:24:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=609054152fd77c9b572bb04c4af2f8da1ed0c86e commit 609054152fd77c9b572bb04c4af2f8da1ed0c86e Author: Joseph Myers Date: Fri Feb 17 17:23:50 2023 +0000 Fix ifunc-impl-list.c build for s390 Builds for s390 recently started failing with: ../sysdeps/s390/multiarch/ifunc-impl-list.c: In function '__libc_ifunc_impl_list': ../sysdeps/s390/multiarch/ifunc-impl-list.c:83:21: error: unused variable 'dl_hwcap' [-Werror=unused-variable] 83 | unsigned long int dl_hwcap = features->hwcap; | ^~~~~~~~ https://sourceware.org/pipermail/libc-testresults/2023q1/010855.html Add __attribute__ ((unused)) as already done for another variable there. Tested with build-many-glibcs.py (compilers and glibcs) for s390x-linux-gnu and s390-linux-gnu. Note: s390x-linux-gnu-O3 started failing with a different error earlier; that problem may still need to be fixed after this fix is in. https://sourceware.org/pipermail/libc-testresults/2023q1/010829.html Diff: --- sysdeps/s390/multiarch/ifunc-impl-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index 1532258af2..faa428f9ab 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -80,7 +80,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Get hardware information. */ const struct cpu_features *features = &GLRO(dl_s390_cpu_features); - unsigned long int dl_hwcap = features->hwcap; + unsigned long int dl_hwcap __attribute__ ((unused)) = features->hwcap; const unsigned long long * __attribute__((unused)) stfle_bits = features->stfle_bits;