[PATCH] Get rid of warning inlining failed in call to maybe_swap_uint32
Stefan Liebler
stli@linux.vnet.ibm.com
Thu Dec 11 15:42:00 GMT 2014
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.
-------------- next part --------------
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
index b579a46..dd00c0d 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -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;
More information about the Libc-alpha
mailing list