Get rid of warning inlining failed in call to maybe_swap_uint32
Commit Message
Hi,
this patch disables warning/error:
In file included from programs/locarchive.c:49:0:
programs/locarchive.c: In function ‘add_locale’:
programs/locfile.h:85:1: warning: inlining failed in call to
‘maybe_swap_uint32’: call is unlikely and code size would grow [-Winline]
programs/locarchive.c:981:12: warning: called from here [-Winline]
The function maybe_swap_uint32 isn´t marked as inline anymore, which
avoids the inlining warning.
The unused attribute was added due to the inclusion of locfile.h in
linereader.c, which does not use maybe_swap_uint32 function.
Tested on s390.
Ok to commit?
Bye
Stefan
---
2014-12-11 Stefan Liebler <stli@linux.vnet.ibm.com>
locale/programs/locfile.h (maybe_swap_uint32):
Remove inline and add unused attribute.
Comments
On Thu, 11 Dec 2014, Stefan Liebler wrote:
> 2014-12-11 Stefan Liebler <stli@linux.vnet.ibm.com>
>
> locale/programs/locfile.h (maybe_swap_uint32):
> Remove inline and add unused attribute.
OK.
@@ -81,7 +81,8 @@ set_big_endian (bool big_endian)
/* Munge VALUE so that, when stored, it has the correct byte order
for the output files. */
-static inline uint32_t
+static uint32_t
+__attribute__ ((unused))
maybe_swap_uint32 (uint32_t value)
{
return swap_endianness_p ? bswap_32 (value) : value;