From 64ad1baee56de1250d571a54da5154f296908564 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 13 Jun 2022 11:20:39 -0400 Subject: [PATCH] Make the PIC macro confuse the type checker less Companion to https://github.com/LedgerHQ/nanos-secure-sdk/pull/43 --- include/os_pic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/os_pic.h b/include/os_pic.h index 6619c39..c08da38 100644 --- a/include/os_pic.h +++ b/include/os_pic.h @@ -8,7 +8,7 @@ #define PIC(x) (x) #endif #ifndef PIC -#define PIC(x) pic((void *)x) +#define PIC(x) ((typeof(x)) pic((void *)x)) void *pic(void *linked_address); void *pic_internal(void *link_address); #endif