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

Jan Dubiec <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
2025-03-02  Jan Dubiec  <[email protected]>

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.
old-prototypes.patch (text/plain, 1015 B)
 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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.