git: 38efd4df23cf - main - rtld-elf: Mark tls_init_align __unused in free_tls for Variant I TLS.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 19:39:19 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=38efd4df23cff3e5722e7fc9094276fcdcff1824
commit 38efd4df23cff3e5722e7fc9094276fcdcff1824
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-20 19:38:48 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-06-20 19:38:48 +0000
rtld-elf: Mark tls_init_align __unused in free_tls for Variant I TLS.
Some architectures (powerpc and RISC-V) always use 0 for the post TLS
size in which case tls_init_align isn't used by
calculate_tls_post_size. Use __unused to quiet the warning for these
platforms.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40673
---
libexec/rtld-elf/rtld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 173dcd4e9878..9a522bf721c5 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -5309,7 +5309,7 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused)
Elf_Addr *dtv;
Elf_Addr tlsstart, tlsend;
size_t post_size;
- size_t dtvsize, i, tls_init_align;
+ size_t dtvsize, i, tls_init_align __unused;
assert(tcbsize >= TLS_TCB_SIZE);
tls_init_align = MAX(obj_main->tlsalign, 1);