You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/25 03:57:53 UTC
[incubator-nuttx] 05/05: arch/sim/include/irq.h: Make 32-bit
xcpt_reg_t unsigned
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e1c53eaeb0e7b5c524af8ac09c0af805ac3f8bb2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Dec 22 16:34:55 2020 +0900
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 bec1d78..604d463 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 */