[08/40] sim/erc32: Insert void parameter

Message ID 26a3eaf4f5d2e0db6977738ddfd65d82b36e38b2.1666257885.git.research_trasio@irq.a4lg.com
State Accepted
Headers
Series sim+gdb: Suppress warnings if built with Clang (big batch 1) |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

Tsukasa OI Oct. 20, 2022, 9:25 a.m. UTC
  Clang generates a warning if there is a function declaration/definition
with zero arguments.  Such declarations/definitions without a prototype (an
argument list) are deprecated forms of indefinite arguments
("-Wdeprecated-non-prototype").  On the default configuration, it causes a
build failure (unless "--disable-werror" is specified).

This commit replaces () with (void) to avoid this warning.
---
 sim/erc32/func.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index 4d1942065b8..af92c9f7d48 100644
--- a/sim/erc32/func.c
+++ b/sim/erc32/func.c
@@ -298,7 +298,7 @@  disp_reg(struct pstate *sregs, char *reg)
 #ifdef ERRINJ
 
 void
-errinj()
+errinj (void)
 {
     int	err;
 
@@ -322,7 +322,7 @@  errinj()
 }
 
 void
-errinjstart()
+errinjstart (void)
 {
     if (errper) event(errinj, 0, (random()%errper));
 }
@@ -855,7 +855,7 @@  event(void (*cfunc) (), int32_t arg, uint64_t delta)
 
 #if 0	/* apparently not used */
 void
-stop_event()
+stop_event(void)
 {
 }
 #endif