This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix warning in elf/tst-unique4lib.cc.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 15 Dec 2014 23:46:08 +0100
- Subject: Re: [PATCH] Fix warning in elf/tst-unique4lib.cc.
- Authentication-results: sourceware.org; auth=none
- References: <1418678728 dot 7165 dot 7 dot camel at triegel dot csb>
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,
--
operation failed because: there is no message for this error (#1014)