Discussion:
[PATCH] sbc: fix "always_inline function might not be inlinable" warning
Siarhei Siamashka
2012-02-24 12:13:16 UTC
Permalink
"__attribute__((always_inline))" does not replace "inline" and they
still need to be used together. This fixes "always_inline function
might not be inlinable [-Wattributes]" warning in gcc 4.7
---
sbc/sbc_primitives.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sbc/sbc_primitives.h b/sbc/sbc_primitives.h
index 3fec8d5..17ad4f7 100644
--- a/sbc/sbc_primitives.h
+++ b/sbc/sbc_primitives.h
@@ -31,7 +31,7 @@
#define SBC_X_BUFFER_SIZE 328

#ifdef __GNUC__
-#define SBC_ALWAYS_INLINE __attribute__((always_inline))
+#define SBC_ALWAYS_INLINE inline __attribute__((always_inline))
#else
#define SBC_ALWAYS_INLINE inline
#endif
--
1.7.3.4
Johan Hedberg
2012-02-24 16:49:01 UTC
Permalink
Hi Siarhei,
Post by Siarhei Siamashka
"__attribute__((always_inline))" does not replace "inline" and they
still need to be used together. This fixes "always_inline function
might not be inlinable [-Wattributes]" warning in gcc 4.7
---
sbc/sbc_primitives.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Applied. Thanks.

Johan

Loading...