Re: Remove unused function warning from AC_C_INLINE

Kurt Schwehr <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <CAHXj0n8gD4Z_OUOB7ckjEWZWD5D7+zyTkZ8qcJ6D-m3REWfvZg@mail.gmail.com>
sigh.  Yes, I was missing the return.

git diff
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index b58e42d..74c6aa8 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(); }
 #endif
 ])],
                    [ac_cv_c_inline=$ac_kw])



On Mon, Jun 9, 2014 at 10:36 AM, Eric Blake <[email protected]> wrote:

> On 06/09/2014 10:47 AM, Kurt Schwehr wrote:
> > See also:
> > http://lists.gnu.org/archive/html/bug-autoconf/2014-06/msg00004.html
> >
> > git diff
> > diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
> > index b58e42d..877b030 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 () {static_foo(); }
>
> Don't you still need the 'return' ?
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


-- 
http://maps.google.com/ocean - http://schwehr.org/blog
ac_c_inline.patch (text/x-patch, 358 B)
--- lib/autoconf/c.m4.orig	2014-06-09 09:40:18.640909445 -0700
+++ lib/autoconf/c.m4	2014-06-09 10:40:42.437411011 -0700
@@ -1742,7 +1742,7 @@
 [#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(); }
 #endif
 ])],
 		    [ac_cv_c_inline=$ac_kw])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.