From e1c53eaeb0e7b5c524af8ac09c0af805ac3f8bb2 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 22 Dec 2020 16:34:55 +0900 Subject: [PATCH] arch/sim/include/irq.h: Make 32-bit xcpt_reg_t unsigned * 64-bit version is already unsigned * up_copyfullstate uses unsigned for 32-bit Error: sim/up_unblocktask.c:107:33: error: pointer targets in passing argument 1 of 'up_copyfullstate' differ in signedness [-Werror=pointer-sign] 107 | up_savestate(rtcb->xcp.regs); | ~~~~~~~~~^~~~~ | | | xcpt_reg_t * {aka int *} sim/up_internal.h:133:45: note: in definition of macro 'up_savestate' 133 | #define up_savestate(regs) up_copyfullstate(regs, (xcpt_reg_t *)CURRENT_REGS) | ^~~~ sim/up_internal.h:205:33: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'xcpt_reg_t *' {aka 'int *'} 205 | void up_copyfullstate(uint32_t *dest, uint32_t *src); | ~~~~~~~~~~^~~~ --- arch/sim/include/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index bec1d78c051..604d4635cc7 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -69,7 +69,7 @@ #if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32) typedef unsigned long xcpt_reg_t; #else -typedef int xcpt_reg_t; +typedef unsigned int xcpt_reg_t; #endif /* This struct defines the way the registers are stored */