Fix warning in elf/tst-unique4lib.cc.

Message ID 1418678728.7165.7.camel@triegel.csb
State Committed
Headers

Commit Message

Torvald Riegel Dec. 15, 2014, 9:25 p.m. UTC
  This fixes a -Werror failure by marking the variable as used.  This is
similar to this fix for the same file:
https://sourceware.org/ml/libc-alpha/2014-11/msg00768.html

OK?


2014-12-15  Torvald Riegel  <triegel@redhat.com>

	* elf/tst-unique4lib.cc(a): Mark as used.
  

Comments

Ondrej Bilka Dec. 15, 2014, 10:46 p.m. UTC | #1
On Mon, Dec 15, 2014 at 10:25:28PM +0100, Torvald Riegel wrote:
> This fixes a -Werror failure by marking the variable as used.  This is
> similar to this fix for the same file:
> https://sourceware.org/ml/libc-alpha/2014-11/msg00768.html
> 
> OK?
>
ok 
> 
> 2014-12-15  Torvald Riegel  <triegel@redhat.com>
> 
> 	* elf/tst-unique4lib.cc(a): Mark as used.
> 

> commit 91ce4235cd595d8fbe683fba500d967a1b601fd1
> Author: Torvald Riegel <triegel@redhat.com>
> Date:   Mon Dec 15 22:05:06 2014 +0100
> 
>     Fix warning in elf/tst-unique4lib.cc.
> 
> diff --git a/elf/tst-unique4lib.cc b/elf/tst-unique4lib.cc
> index 20a10e9..17a7cdf 100644
> --- a/elf/tst-unique4lib.cc
> +++ b/elf/tst-unique4lib.cc
> @@ -6,7 +6,7 @@ int S<N>::i = N;
>  template<int N>
>  const int S<N>::j __attribute__ ((used)) = -1;
>  
> -static int a[24] =
> +static int a[24] __attribute__ ((used)) =
>    {
>      S<1>::i, S<2>::i, S<3>::i, S<4>::i, S<5>::i, S<6>::i, S<7>::i, S<8>::i,
>      S<9>::i, S<10>::i, S<11>::i, S<12>::i, S<13>::i, S<14>::i, S<15>::i,
  

Patch

commit 91ce4235cd595d8fbe683fba500d967a1b601fd1
Author: Torvald Riegel <triegel@redhat.com>
Date:   Mon Dec 15 22:05:06 2014 +0100

    Fix warning in elf/tst-unique4lib.cc.

diff --git a/elf/tst-unique4lib.cc b/elf/tst-unique4lib.cc
index 20a10e9..17a7cdf 100644
--- a/elf/tst-unique4lib.cc
+++ b/elf/tst-unique4lib.cc
@@ -6,7 +6,7 @@  int S<N>::i = N;
 template<int N>
 const int S<N>::j __attribute__ ((used)) = -1;
 
-static int a[24] =
+static int a[24] __attribute__ ((used)) =
   {
     S<1>::i, S<2>::i, S<3>::i, S<4>::i, S<5>::i, S<6>::i, S<7>::i, S<8>::i,
     S<9>::i, S<10>::i, S<11>::i, S<12>::i, S<13>::i, S<14>::i, S<15>::i,