[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_C_INLINE with -Werror llvm 3.4
From: |
Václav Zeman |
Subject: |
Re: AC_C_INLINE with -Werror llvm 3.4 |
Date: |
Mon, 09 Jun 2014 06:06:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 8.6.2014 18:25, Kurt Schwehr wrote:
> I'm trying to clean hdf5 1.9.182 a bit and I'm using -Werror as my first
> pass tool. Just cleaning the messages that come up. However, passing
> -Werror as CPPFLAGS causes configure to die on a number of places. Here is
> a first one with a proposed fix. The AC_C_INLINE macro tries to compile an
> inline function, but doesn't use it. Why not just make the return 0 be
> returning the zero from the static_foo inline function to insure that it's
> used?
>
> git diff
> diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
> index b58e42d..6779407 100644
> --- a/lib/autoconf/c.m4
> +++ b/lib/autoconf/c.m4
> @@ -1742,7 +1742,7 @@ for ac_kw in inline __inline__ __inline; do
> [#ifndef __cplusplus
> typedef int foo_t;
> static $ac_kw foo_t static_foo () {return 0; }
> -$ac_kw foo_t foo () {return 0; }
> +$ac_kw foo_t foo () {return static_foo; }
~~^
Are't you missing () there to actually call the function?
--
VZ