From 9b35a2e1a1aaa501a7dbe1aed3274daf5483d4d7 Mon Sep 17 00:00:00 2001 From: ligd Date: Wed, 8 Feb 2023 17:54:29 +0800 Subject: [PATCH] sim: fix compile warning sim/sim_doirq.c: In function 'sim_doirq': Error: sim/sim_doirq.c:79:10: error: function may return address of local variable [-Werror=return-local-addr] 79 | return regs; | ^~~~ sim/sim_doirq.c:44:14: note: declared here 44 | xcpt_reg_t tmp[XCPTCONTEXT_REGS]; | ^~~ Signed-off-by: ligd --- arch/sim/src/sim/sim_doirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sim/src/sim/sim_doirq.c b/arch/sim/src/sim/sim_doirq.c index a55b984e61..a84c90622c 100644 --- a/arch/sim/src/sim/sim_doirq.c +++ b/arch/sim/src/sim/sim_doirq.c @@ -76,5 +76,5 @@ void *sim_doirq(int irq, void *context) sim_fullcontextrestore(regs); } - return regs; + return NULL; }