[Spice-devel,xf86-video-qxl,v2,cleanup,6/6] murmurhash3: fix "always_inline function might not be inlinable" warning

Submitted by Alon Levy on April 24, 2012, 9:21 a.m.

Details

Message ID 1335259287-23125-6-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy April 24, 2012, 9:21 a.m.
"__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
---
 src/murmurhash3.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/murmurhash3.c b/src/murmurhash3.c
index afb7d7d..a6d097a 100644
--- a/src/murmurhash3.c
+++ b/src/murmurhash3.c
@@ -29,7 +29,7 @@ 
 
 #else	// defined(_MSC_VER)
 
-#define	FORCE_INLINE __attribute__((always_inline))
+#define	FORCE_INLINE inline __attribute__((always_inline))
 
 static inline uint32_t rotl32 ( uint32_t x, int8_t r )
 {

Comments

ACK

Christophe

On Tue, Apr 24, 2012 at 12:21:27PM +0300, Alon Levy wrote:
> "__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
> ---
>  src/murmurhash3.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/murmurhash3.c b/src/murmurhash3.c
> index afb7d7d..a6d097a 100644
> --- a/src/murmurhash3.c
> +++ b/src/murmurhash3.c
> @@ -29,7 +29,7 @@
>  
>  #else	// defined(_MSC_VER)
>  
> -#define	FORCE_INLINE __attribute__((always_inline))
> +#define	FORCE_INLINE inline __attribute__((always_inline))
>  
>  static inline uint32_t rotl32 ( uint32_t x, int8_t r )
>  {
> -- 
> 1.7.10
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel