[PATCH 1/7] Mark lazy tlsdesc helper functions unused to avoid warnings
Florian Weimer
fweimer@redhat.com
Fri Nov 3 12:14:00 GMT 2017
On 10/24/2017 04:24 PM, Szabolcs Nagy wrote:
> diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h
> index ad3001dac5..879631897c 100644
> --- a/elf/tlsdeschtab.h
> +++ b/elf/tlsdeschtab.h
> @@ -137,6 +137,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
> avoid introducing such dependencies. */
>
> static int
> +__attribute__ ((unused))
> _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
> {
> if (caller != atomic_load_relaxed (&td->entry))
> @@ -155,6 +156,7 @@ _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
> }
>
> static void
> +__attribute__ ((unused))
> _dl_tlsdesc_wake_up_held_fixups (void)
> {
> __rtld_lock_unlock_recursive (GL(dl_load_lock));
I think the preferred syntax is to put the attribute before the return
type; after the type, it would apply to the type, and not the function,
and GCC has hacks to support that, but that will only work for some types.
Otherwise, this looks okay to me.
Thanks,
Florian
More information about the Libc-alpha
mailing list