From 5aae7519926c96dc2b0c2fd670870c5d77f9669c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 3 Oct 2021 13:39:11 +0000 Subject: [PATCH] Fixed an harmless warning under rare conditions. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14867 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/ARMv6-M-RP2/chcore.h | 2 +- os/common/ports/ARMv6-M/chcore.h | 2 +- os/common/ports/ARMv7-M/chcore.h | 2 +- os/common/ports/e200/chcore.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/os/common/ports/ARMv6-M-RP2/chcore.h b/os/common/ports/ARMv6-M-RP2/chcore.h index 9e6ffd60c..2a0f3b802 100644 --- a/os/common/ports/ARMv6-M-RP2/chcore.h +++ b/os/common/ports/ARMv6-M-RP2/chcore.h @@ -456,7 +456,7 @@ struct port_context { #else #define port_switch(ntp, otp) do { \ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \ - if ((stkalign_t *)(r13 - 1) < (otp)->wabase) { \ + if ((stkalign_t *)(void *)(r13 - 1) < (otp)->wabase) { \ chSysHalt("stack overflow"); \ } \ __port_switch(ntp, otp); \ diff --git a/os/common/ports/ARMv6-M/chcore.h b/os/common/ports/ARMv6-M/chcore.h index 4541e92c9..199bce1e6 100644 --- a/os/common/ports/ARMv6-M/chcore.h +++ b/os/common/ports/ARMv6-M/chcore.h @@ -415,7 +415,7 @@ struct port_context { #else #define port_switch(ntp, otp) do { \ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \ - if ((stkalign_t *)(r13 - 1) < (otp)->wabase) { \ + if ((stkalign_t *)(void *)(r13 - 1) < (otp)->wabase) { \ chSysHalt("stack overflow"); \ } \ __port_switch(ntp, otp); \ diff --git a/os/common/ports/ARMv7-M/chcore.h b/os/common/ports/ARMv7-M/chcore.h index b762efdf1..16338b500 100644 --- a/os/common/ports/ARMv7-M/chcore.h +++ b/os/common/ports/ARMv7-M/chcore.h @@ -699,7 +699,7 @@ struct port_context { #if PORT_ENABLE_GUARD_PAGES == FALSE #define port_switch(ntp, otp) do { \ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \ - if ((stkalign_t *)(r13 - 1) < (otp)->wabase) { \ + if ((stkalign_t *)(void *)(r13 - 1) < (otp)->wabase) { \ chSysHalt("stack overflow"); \ } \ __port_switch(ntp, otp); \ diff --git a/os/common/ports/e200/chcore.h b/os/common/ports/e200/chcore.h index 5f69e1cff..2f6947f67 100644 --- a/os/common/ports/e200/chcore.h +++ b/os/common/ports/e200/chcore.h @@ -437,7 +437,7 @@ struct port_context { #else #define port_switch(ntp, otp) { \ register struct port_intctx *sp asm ("%r1"); \ - if ((stkalign_t *)(sp - 1) < otp->wabase) \ + if ((stkalign_t *)(void *)(sp - 1) < otp->wabase) \ chSysHalt("stack overflow"); \ _port_switch(ntp, otp); \ }