summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-08-06 17:37:42 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-08-06 17:52:49 -0700
commit0ea8d9d4680ef36964aef9c7f7cd54af7bbc6758 (patch)
treed0fc80fa664c41cea5b3f77f4b87c9698d10b7b7
parent185f58e9c1cfff7e41620d037af11dfffada8e95 (diff)
downloadautoconf-0ea8d9d4680ef36964aef9c7f7cd54af7bbc6758.tar.gz
Pacify -Werror in two places
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.
-rw-r--r--lib/autoconf/c.m48
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 0027f98b..eaef13a9 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -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])