[PATCH 1/2] libgloss/riscv: Fix old style function declaration warnings

Pincheng Wang <[email protected]> Mon, 1 Dec 2025 22:33:32 +0800
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Signed-off-by: Pincheng Wang <[email protected]>
---
 libgloss/libnosys/sbrk.c           | 3 +--
 libgloss/riscv/semihost-sys_sbrk.c | 3 +--
 libgloss/riscv/sys_sbrk.c          | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/libgloss/libnosys/sbrk.c b/libgloss/libnosys/sbrk.c
index 86c130ab6..f48f27fa5 100644
--- a/libgloss/libnosys/sbrk.c
+++ b/libgloss/libnosys/sbrk.c
@@ -4,8 +4,7 @@
 #include <_syslist.h>
 
 void *
-_sbrk (incr)
-     int incr;
+_sbrk (int incr)
 {
    extern char   end; /* Set by linker.  */
    static char * heap_end;
diff --git a/libgloss/riscv/semihost-sys_sbrk.c b/libgloss/riscv/semihost-sys_sbrk.c
index cbd035832..8944e6572 100644
--- a/libgloss/riscv/semihost-sys_sbrk.c
+++ b/libgloss/riscv/semihost-sys_sbrk.c
@@ -12,8 +12,7 @@ char *heap_ptr;
  *         left of memory on the board.
  */
 char *
-_sbrk (nbytes)
-     int nbytes;
+_sbrk (int nbytes)
 {
   char *base;
 
diff --git a/libgloss/riscv/sys_sbrk.c b/libgloss/riscv/sys_sbrk.c
index 086509efa..48133ba88 100644
--- a/libgloss/riscv/sys_sbrk.c
+++ b/libgloss/riscv/sys_sbrk.c
@@ -10,8 +10,7 @@ char *heap_ptr;
  *         left of memory on the board.
  */
 char *
-_sbrk (nbytes)
-     int nbytes;
+_sbrk (int nbytes)
 {
   char        *base;
 
-- 
2.39.5