OSDN Git Service

Make inlines static
authorColin Cross <ccross@android.com>
Fri, 30 Jun 2017 21:05:23 +0000 (14:05 -0700)
committerColin Cross <ccross@android.com>
Sat, 1 Jul 2017 02:09:02 +0000 (02:09 +0000)
Compiling the non-static inlines with -Oz results in missing symbols,
because clang chooses not to inline the functions but also doesn't
emit a definition because they are not static or extern.  They are
only used in this .c file, so make them static.

Test: builds with -Oz
Bug: 62549703
Change-Id: Ibb78ad982c2911e151f0dd6b01eb6164fe6e8e63
Merged-In: Ibb78ad982c2911e151f0dd6b01eb6164fe6e8e63
(cherry picked from commit c7eae5d84a55de0450b9947a26127ef05cb089a5)

audio_utils/channels.c

index fa005d3..1e22e8b 100644 (file)
@@ -32,7 +32,7 @@ static inline int32_t clamp24(int32_t sample)
 /*
  * Converts a uint8x3_t into an int32_t
  */
-inline int32_t uint8x3_to_int32(uint8x3_t val) {
+static inline int32_t uint8x3_to_int32(uint8x3_t val) {
 #ifdef HAVE_BIG_ENDIAN
     int32_t temp = (val.c[0] << 24 | val.c[1] << 16 | val.c[2] << 8) >> 8;
 #else
@@ -44,7 +44,7 @@ inline int32_t uint8x3_to_int32(uint8x3_t val) {
 /*
  * Converts an int32_t to a uint8x3_t
  */
-inline uint8x3_t int32_to_uint8x3(int32_t in) {
+static inline uint8x3_t int32_to_uint8x3(int32_t in) {
     uint8x3_t out;
 #ifdef HAVE_BIG_ENDIAN
     out.c[2] = in;