From 57e3eee069a54ca09d89055bf6eccff710f87ed8 Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Sat, 24 Sep 2022 09:54:32 +0000 Subject: sim/erc32: Use int32_t as IRQ callback argument Clang generates a warning if an argument is passed to a function without prototype (zero arguments, even without (void)). Such calls are deprecated forms of indefinite arguments passing ("-Wdeprecated-non-prototype"). On the default configuration, it (somehow) doesn't cause a build failure but a warning is generated. But because the cause is the same as the issue the author fixed in "sim/erc32: Use int32_t as event callback argument", it would be better to fix it now to prevent problems in the future. To fix the issue, this commit makes struct irqcall to use int32_t as a callback (callback) argument of an IRQ. --- sim/erc32/func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/erc32/func.c') diff --git a/sim/erc32/func.c b/sim/erc32/func.c index 85d3c0c..86a395f 100644 --- a/sim/erc32/func.c +++ b/sim/erc32/func.c @@ -874,7 +874,7 @@ init_event(void) } void -set_int(int32_t level, void (*callback) (), int32_t arg) +set_int(int32_t level, void (*callback) (int32_t), int32_t arg) { irqarr[level & 0x0f].callback = callback; irqarr[level & 0x0f].arg = arg; -- cgit v1.1