[PATCH v2] ldso: fix unused variable warning
Filippo ARCIDIACONO
filippo.arcidiacono at st.com
Wed Aug 28 06:46:30 UTC 2013
Good!
Now it works.
Filippo.
On 8/27/2013 8:20 PM, Baruch Siach wrote:
> This fixes the following warning when SUPPORT_LD_DEBUG_EARLY is not enabled:
>
> ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
> ldso/ldso/ldso.c:754:16: warning: unused variable 'tmp' [-Wunused-variable]
>
> This was introduced with commit 94cc6edb (ldso: Rework global scope handling
> and symbol lookup mechanism).
>
> Cc: Filippo Arcidiacono <filippo.arcidiacono at st.com>
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
> ---
>
> v2: We need the old value of l_tls_initimage for the debug message, so instead
> of removing 'tmp', mark it with the 'unused' attribute (Filippo
> Arcidiacono)
>
> ldso/ldso/ldso.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
> index 2d7a234..fddc787 100644
> --- a/ldso/ldso/ldso.c
> +++ b/ldso/ldso/ldso.c
> @@ -751,7 +751,8 @@ of this helper program; chances are you did not intend to run this program.\n\
> * case the executable is actually an ET_DYN object.
> */
> if (app_tpnt->l_tls_initimage != NULL) {
> - unsigned int tmp = (unsigned int) app_tpnt->l_tls_initimage;
> + unsigned int tmp __attribute((unused)) =
> + (unsigned int) app_tpnt->l_tls_initimage;
> app_tpnt->l_tls_initimage =
> (char *) app_tpnt->l_tls_initimage + app_tpnt->loadaddr;
> _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n",
More information about the uClibc
mailing list