autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above)


From: Vincent Lefevre
Subject: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).
Date: Wed, 5 Aug 2020 12:59:55 +0200
User-agent: Mutt/1.14.5+76 (bb407ec3) vl-127292 (2020-06-24)

This allows one to avoid a failure with AC_COMPUTE_INT when using
the -Werror=old-style-definition GCC option.

* lib/autoconf/c.m4 (AC_LANG_INT_SAVE): In function declarators,
use "(void)" instead of "()".

Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
---
 lib/autoconf/c.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index b2129d5d..98e3e40d 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>],
 [
-- 
2.28.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]