Browse Source

ldso: fix unused variable warning

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@st.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Baruch Siach 12 years ago
parent
commit
7a3d6cfb4a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ldso/ldso/ldso.c

+ 2 - 1
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",