From 082e780886b6b68208b83642c286421e47834b12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20R=C3=BChsen?= Date: Wed, 5 Apr 2017 15:58:22 +0200 Subject: [PATCH] error: Avoid "function declaration isn't a prototype" warning. * lib/error.c (strerror_r): Turn K&R C prototype to an ANSI C prototype. --- ChangeLog | 5 +++++ lib/error.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49988416db..94f3219396 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-04-05 Tim Rühsen + + error: Avoid "function declaration isn't a prototype" warning. + * lib/error.c (strerror_r): Turn K&R C prototype to an ANSI C prototype. + 2017-04-21 Bruno Haible vasnprintf: Fix for MSVC 14. diff --git a/lib/error.c b/lib/error.c index 535d8a2ad9..0ed7c86bc1 100644 --- a/lib/error.c +++ b/lib/error.c @@ -109,9 +109,9 @@ extern void __error_at_line (int status, int errnum, const char *file_name, "this configure-time declaration test was not run" # endif # if STRERROR_R_CHAR_P -char *strerror_r (); +char *strerror_r (int errnum, char *buf, size_t buflen); # else -int strerror_r (); +int strerror_r (int errnum, char *buf, size_t buflen); # endif # endif -- 2.39.5