From: Paul Eggert Date: Fri, 7 Aug 2020 00:37:42 +0000 (-0700) Subject: Pacify -Werror in two places X-Git-Tag: v2.69c~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ea8d9d4680ef36964aef9c7f7cd54af7bbc6758;p=thirdparty%2Fautoconf.git 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. --- 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 @%:@include ], [ @@ -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])