From e70bd5536fd1b6cf13c7077a6a017f1026a08996 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 16 Aug 2021 08:48:14 +0000 Subject: [PATCH] More warnings cleanup, restored RT test build application. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14658 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/SIMIA32/chcore.h | 16 ++++++++-------- test/rt/testbuild/main.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/os/common/ports/SIMIA32/chcore.h b/os/common/ports/SIMIA32/chcore.h index 02e939666..c2c6075aa 100644 --- a/os/common/ports/SIMIA32/chcore.h +++ b/os/common/ports/SIMIA32/chcore.h @@ -179,7 +179,7 @@ struct port_context { #define APUSH(p, a) do { \ (p) -= sizeof(void *); \ - *(void **)(p) = (void*)(a); \ + *(void **)(void *)(p) = (void*)(a); \ } while (false) /* Darwin requires the stack to be aligned to a 16-byte boundary at @@ -187,7 +187,7 @@ struct port_context { * to save MMX registers). This aligns to 'mod' module 16, so that we'll end * up with the right alignment after pushing the args. */ #define AALIGN(p, mask, mod) \ - p = (void *)((((uint32_t)(p) - (uint32_t)(mod)) & ~(uint32_t)(mask)) + (uint32_t)(mod)) \ + p = (void *)((((uint32_t)(p) - (uint32_t)(mod)) & ~(uint32_t)(mask)) + (uint32_t)(mod)) /** * @brief Platform dependent part of the @p chThdCreateI() API. @@ -204,12 +204,12 @@ struct port_context { APUSH(esp, pf); \ APUSH(esp, 0); \ esp -= sizeof(struct port_intctx); \ - ((struct port_intctx *)esp)->eip = (void *)_port_thread_start; \ - ((struct port_intctx *)esp)->ebx = NULL; \ - ((struct port_intctx *)esp)->edi = NULL; \ - ((struct port_intctx *)esp)->esi = NULL; \ - ((struct port_intctx *)esp)->ebp = (void *)savebp; \ - (tp)->ctx.sp = (struct port_intctx *)esp; \ + ((struct port_intctx *)(void *)esp)->eip = (void *)_port_thread_start; \ + ((struct port_intctx *)(void *)esp)->ebx = NULL; \ + ((struct port_intctx *)(void *)esp)->edi = NULL; \ + ((struct port_intctx *)(void *)esp)->esi = NULL; \ + ((struct port_intctx *)(void *)esp)->ebp = (void *)savebp; \ + (tp)->ctx.sp = (struct port_intctx *)(void *)esp; \ /*lint -restore*/ \ } diff --git a/test/rt/testbuild/main.c b/test/rt/testbuild/main.c index 3ef1d4b78..16fad3bc8 100644 --- a/test/rt/testbuild/main.c +++ b/test/rt/testbuild/main.c @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { test_execute((BaseSequentialStream *)&CD1, &rt_test_suite); test_execute((BaseSequentialStream *)&CD1, &oslib_test_suite); - if (test_global_fail) + if (chtest.global_fail) exit(1); else exit(0);