aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2022-08-18 09:10:48 +0200
committerStefan Liebler <stli@linux.ibm.com>2022-08-18 09:10:48 +0200
commitf465b21b06a17e26c1af7d75603afc481ebce0f6 (patch)
tree767c7c7437b2b5eba83e93f7865181ec9f041bad /sysdeps/s390
parent2b274fd8c9c776cf70fcdb8356e678ada522a7b0 (diff)
downloadglibc-f465b21b06a17e26c1af7d75603afc481ebce0f6.zip
glibc-f465b21b06a17e26c1af7d75603afc481ebce0f6.tar.gz
glibc-f465b21b06a17e26c1af7d75603afc481ebce0f6.tar.bz2
S390: Fix werror=unused-variable in ifunc-impl-list.c.
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
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/multiarch/ifunc-impl-list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c
index 5d0c730..7bee543 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);