[PATCH] H8/300: Silence -Wold-style-definition warnings

Jan Dubiec jdx@o2.pl
Sun Mar 2 15:42:36 GMT 2025


2025-03-02  Jan Dubiec  <jdx@o2.pl>

newlib/ChangeLog:

	* libc/sys/h8300hms/sbrk.c: Replace the K&R definition with the
	standard one.
	* libc/sys/h8300hms/syscalls.c (_isatty): Ditto.
	(_unlink): Ditto.
-------------- next part --------------
 newlib/libc/sys/h8300hms/sbrk.c     | 3 +--
 newlib/libc/sys/h8300hms/syscalls.c | 6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/newlib/libc/sys/h8300hms/sbrk.c b/newlib/libc/sys/h8300hms/sbrk.c
index a99ae2904..30feba38d 100644
--- a/newlib/libc/sys/h8300hms/sbrk.c
+++ b/newlib/libc/sys/h8300hms/sbrk.c
@@ -7,8 +7,7 @@ register char *stack_ptr asm ("sp");
 extern int _write (int, char *, int);
 
 caddr_t 
-  _sbrk(incr)
-     int incr;
+  _sbrk(int incr)
 {
   extern char end;		/* Defined by the linker */
   static char *heap_end;
diff --git a/newlib/libc/sys/h8300hms/syscalls.c b/newlib/libc/sys/h8300hms/syscalls.c
index b9ec17a52..6a97baa8e 100644
--- a/newlib/libc/sys/h8300hms/syscalls.c
+++ b/newlib/libc/sys/h8300hms/syscalls.c
@@ -3,15 +3,13 @@
 #include <_ansi.h>
 #include <errno.h>
 
-int _isatty(file)
-     int file;
+int _isatty(int file)
 {
   return 1;
 }
 
 int
-_unlink (path)
-     const char *path;
+_unlink (const char *path)
 {
   errno = EIO;
   return -1;


More information about the Newlib mailing list