H8/300: Silence -Wold-style-definition warnings

Message ID 3aa942d6-7d2f-4c2f-a371-994926a6739b@o2.pl
State New
Headers
Series H8/300: Silence -Wold-style-definition warnings |

Commit Message

Jan Dubiec March 2, 2025, 3:42 p.m. UTC
  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.
newlib/libc/sys/h8300hms/sbrk.c     | 3 +--
 newlib/libc/sys/h8300hms/syscalls.c | 6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)
  

Comments

Corinna Vinschen March 3, 2025, 11:07 a.m. UTC | #1
Hi Jan,

On Mar  2 16:42, Jan Dubiec wrote:
> 
> 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.

all three patches pushed.


Thanks,
Corinna
  

Patch

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;