mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
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:
parent
304420b99c
commit
72a7e3dc5e
4 changed files with 4 additions and 16 deletions
5
lib/libc/mingw/misc/strtoimax.c
vendored
5
lib/libc/mingw/misc/strtoimax.c
vendored
|
|
@ -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 */
|
||||||
|
|
|
||||||
5
lib/libc/mingw/misc/strtoumax.c
vendored
5
lib/libc/mingw/misc/strtoumax.c
vendored
|
|
@ -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 */
|
||||||
|
|
|
||||||
5
lib/libc/mingw/misc/wcstoimax.c
vendored
5
lib/libc/mingw/misc/wcstoimax.c
vendored
|
|
@ -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 */
|
||||||
|
|
|
||||||
5
lib/libc/mingw/misc/wcstoumax.c
vendored
5
lib/libc/mingw/misc/wcstoumax.c
vendored
|
|
@ -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 */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue