diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2012-03-14 15:39:12 +0100 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2012-03-14 15:58:49 +0100 |
commit | bdff674a0264e9d8dd9b8b9041c28aa168927e5c (patch) | |
tree | b82c04de1286355df5f84ef6dab57beb1f1db237 /ldso | |
parent | dd44bf943894b4a830c6007dfde0ee7c07ff0edd (diff) |
ldso:sh: fix compiler warning due to unused-but-set-variable
gcc 4.6.x raises useful warnings due to unused-but-set-variable,
This patch fixes the following one by using properly preprocessor
guard
In file included from ldso/libdl/libdl.c:129:0:
./ldso/ldso/sh/elfinterp.c: In function '_dl_do_reloc':
./ldso/ldso/sh/elfinterp.c:163:22: warning: variable 'tls_tpnt' set but not used [-Wunused-but-set-variable]
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/sh/elfinterp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index da55b6a3a..35d2971b4 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -160,7 +160,9 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope, unsigned long old_val; #endif +#if defined USE_TLS && USE_TLS struct elf_resolve *tls_tpnt = NULL; +#endif struct symbol_ref sym_ref; reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset); @@ -193,7 +195,9 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope, _dl_debug_lookup (symname, tpnt, &symtab[symtab_index], &sym_ref, elf_machine_type_class(reloc_type)); } +#if defined USE_TLS && USE_TLS tls_tpnt = sym_ref.tpnt; +#endif } #if defined (__SUPPORT_LD_DEBUG__) |