]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Pacify -Werror in two places
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Aug 2020 00:37:42 +0000 (17:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Aug 2020 00:52:49 +0000 (17:52 -0700)
Although this cannot easily be done in general, there are a couple
of places where it’s easy.
* lib/autoconf/c.m4 (AC_LANG_INT_SAVE (C)):
Change ‘()’ to ‘(void)’ to pacify picky compilers.
Problem reported by Vincent Lefevre in:
https://lists.gnu.org/r/autoconf-patches/2020-08/msg00000.html
(AC_C_INLINE): Likewise.

lib/autoconf/c.m4

index 0027f98b4eb0c56f806df0ed2372e0257f495048..eaef13a9252a4255155930e6100c77e39a1b102e 100644 (file)
@@ -194,8 +194,8 @@ return test_array @<:@0@:>@;
 # But we include them only after the EXPRESSION has been evaluated.
 m4_define([AC_LANG_INT_SAVE(C)],
 [AC_LANG_PROGRAM([$1
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
 @%:@include <stdio.h>
 @%:@include <stdlib.h>],
 [
@@ -1747,8 +1747,8 @@ for ac_kw in inline __inline__ __inline; do
   AC_COMPILE_IFELSE([AC_LANG_SOURCE(
 [#ifndef __cplusplus
 typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
 #endif
 ])],
                    [ac_cv_c_inline=$ac_kw])