This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror now enabled by default
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 11 Dec 2014 14:30:07 +0000
- Subject: Re: -Werror now enabled by default
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1412100115170 dot 18857 at digraph dot polyomino dot org dot uk> <mvmiohjsci8 dot fsf at hawking dot suse dot de> <alpine dot DEB dot 2 dot 10 dot 1412101621480 dot 32166 at digraph dot polyomino dot org dot uk> <m6bpv2$pa$1 at ger dot gmane dot org>
On Thu, 11 Dec 2014, Stefan Liebler wrote:
> Removing the inline from maybe_swap_uint32 in locfile.h leads to:
> gcc ../locale/programs/linereader.c -c ...
> In file included from ../locale/programs/linereader.c:35:0:
> ../locale/programs/locfile.h:89:1: error: ‘maybe_swap_uint32’ defined but not
> used [-Werror=unused-function]
> maybe_swap_uint32 (uint32_t value)
> ^
> cc1: all warnings being treated as errors
So use __attribute__ ((unused)) to avoid that error.
--
Joseph S. Myers
joseph@codesourcery.com