Skip to content

Commit 72a7e3d

Browse files
praschkeandrewrk
authored andcommitted
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.
1 parent 304420b commit 72a7e3d

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

lib/libc/mingw/misc/strtoimax.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
#define valid(n, b) ((n) >= 0 && (n) < (b))
3232

3333
intmax_t
34-
strtoimax(nptr, endptr, base)
35-
register const char * __restrict__ nptr;
36-
char ** __restrict__ endptr;
37-
register int base;
34+
strtoimax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base)
3835
{
3936
register uintmax_t accum; /* accumulates converted value */
4037
register int n; /* numeral from digit character */

lib/libc/mingw/misc/strtoumax.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
#define valid(n, b) ((n) >= 0 && (n) < (b))
3232

3333
uintmax_t
34-
strtoumax(nptr, endptr, base)
35-
register const char * __restrict__ nptr;
36-
char ** __restrict__ endptr;
37-
register int base;
34+
strtoumax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base)
3835
{
3936
register uintmax_t accum; /* accumulates converted value */
4037
register uintmax_t next; /* for computing next value of accum */

lib/libc/mingw/misc/wcstoimax.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
#define valid(n, b) ((n) >= 0 && (n) < (b))
3434

3535
intmax_t
36-
wcstoimax(nptr, endptr, base)
37-
register const wchar_t * __restrict__ nptr;
38-
wchar_t ** __restrict__ endptr;
39-
register int base;
36+
wcstoimax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
4037
{
4138
register uintmax_t accum; /* accumulates converted value */
4239
register int n; /* numeral from digit character */

lib/libc/mingw/misc/wcstoumax.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
#define valid(n, b) ((n) >= 0 && (n) < (b))
3434

3535
uintmax_t
36-
wcstoumax(nptr, endptr, base)
37-
register const wchar_t * __restrict__ nptr;
38-
wchar_t ** __restrict__ endptr;
39-
register int base;
36+
wcstoumax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
4037
{
4138
register uintmax_t accum; /* accumulates converted value */
4239
register uintmax_t next; /* for computing next value of accum */

0 commit comments

Comments
 (0)