aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-09-24 09:16:57 +0000
committerTsukasa OI <research_trasio@irq.a4lg.com>2022-10-29 08:13:15 +0000
commitdc4e697f2fec232cecfd1d162365ce836c785369 (patch)
tree5ebc62102bd6896e8891d7caf42ded403165c1cc /sim
parent58d8e5fab3798ed91378b661088f5e6b175bbd98 (diff)
downloadbinutils-dc4e697f2fec232cecfd1d162365ce836c785369.zip
binutils-dc4e697f2fec232cecfd1d162365ce836c785369.tar.gz
binutils-dc4e697f2fec232cecfd1d162365ce836c785369.tar.bz2
sim/erc32: Insert void parameter
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.
Diffstat (limited to 'sim')
-rw-r--r--sim/erc32/func.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index 4d19420..af92c9f 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