Fix elf/tst-unique4lib.cc warning

Message ID alpine.DEB.2.10.1411261331570.30398@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Nov. 26, 2014, 1:32 p.m. UTC
  This patch fixes a warning "tst-unique4lib.cc:17:12: warning: 'b'
defined but not used [-Wunused-variable]".  I'm not sure exactly what
aspects of the test are or are not significant for the issue it is
testing for; the patch makes the minimal change of marking the
variable with __attribute__ ((used)).

Tested for x86_64.

2014-11-26  Joseph Myers  <joseph@codesourcery.com>

	* elf/tst-unique4lib.cc (b): Mark with __attribute__ ((used)).
  

Comments

Joseph Myers Dec. 2, 2014, 5:48 p.m. UTC | #1
Ping.  This patch 
<https://sourceware.org/ml/libc-alpha/2014-11/msg00768.html> is pending 
review.
  
Roland McGrath Dec. 2, 2014, 8:43 p.m. UTC | #2
OK
  

Patch

diff --git a/elf/tst-unique4lib.cc b/elf/tst-unique4lib.cc
index c9fdf9c..20a10e9 100644
--- a/elf/tst-unique4lib.cc
+++ b/elf/tst-unique4lib.cc
@@ -14,4 +14,4 @@  static int a[24] =
     S<23>::i, S<24>::i
   };
 
-static int b = S<1>::j;
+static int b __attribute__ ((used)) = S<1>::j;