From: Stefan Liebler <stli@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: Stefan Liebler <stli@linux.ibm.com>
Subject: [COMMITTED] S390: Fix werror=unused-variable in ifunc-impl-list.c.
Date: Thu, 18 Aug 2022 09:12:10 +0200 [thread overview]
Message-ID: <20220818071210.12100-1-stli@linux.ibm.com> (raw)
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
reply other threads:[~2022-08-18 7:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220818071210.12100-1-stli@linux.ibm.com \
--to=stli@linux.ibm.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).