mingw: stop using K&R-style function definitions

this patch is from upstream, to fix -Wdeprecated-non-prototypes issues.

K&R-style has apparently been deprecated since even C89, and C2x will be
repurposing the syntax space. this warning triggers when the change would
affect the meaning of the code.
This commit is contained in:
praschke 2023-02-01 20:52:06 +00:00 committed by Andrew Kelley
parent 304420b99c
commit 72a7e3dc5e
4 changed files with 4 additions and 16 deletions

View file

@ -31,10 +31,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b)) #define valid(n, b) ((n) >= 0 && (n) < (b))
intmax_t intmax_t
strtoimax(nptr, endptr, base) strtoimax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base)
register const char * __restrict__ nptr;
char ** __restrict__ endptr;
register int base;
{ {
register uintmax_t accum; /* accumulates converted value */ register uintmax_t accum; /* accumulates converted value */
register int n; /* numeral from digit character */ register int n; /* numeral from digit character */

View file

@ -31,10 +31,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b)) #define valid(n, b) ((n) >= 0 && (n) < (b))
uintmax_t uintmax_t
strtoumax(nptr, endptr, base) strtoumax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base)
register const char * __restrict__ nptr;
char ** __restrict__ endptr;
register int base;
{ {
register uintmax_t accum; /* accumulates converted value */ register uintmax_t accum; /* accumulates converted value */
register uintmax_t next; /* for computing next value of accum */ register uintmax_t next; /* for computing next value of accum */

View file

@ -33,10 +33,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b)) #define valid(n, b) ((n) >= 0 && (n) < (b))
intmax_t intmax_t
wcstoimax(nptr, endptr, base) wcstoimax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
register const wchar_t * __restrict__ nptr;
wchar_t ** __restrict__ endptr;
register int base;
{ {
register uintmax_t accum; /* accumulates converted value */ register uintmax_t accum; /* accumulates converted value */
register int n; /* numeral from digit character */ register int n; /* numeral from digit character */

View file

@ -33,10 +33,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b)) #define valid(n, b) ((n) >= 0 && (n) < (b))
uintmax_t uintmax_t
wcstoumax(nptr, endptr, base) wcstoumax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
register const wchar_t * __restrict__ nptr;
wchar_t ** __restrict__ endptr;
register int base;
{ {
register uintmax_t accum; /* accumulates converted value */ register uintmax_t accum; /* accumulates converted value */
register uintmax_t next; /* for computing next value of accum */ register uintmax_t next; /* for computing next value of accum */