From 0650d40d8359a2c24078f4fcd96dcc314d266372 Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Wed, 30 Oct 2019 20:04:38 +0000 Subject: [PATCH] kernel: include: Fix warning when !CONFIG_SYS_CLOCK_EXISTS When the kernel is compiled with !CONFIG_SYS_CLOCK_EXISTS we get the warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix this avoiding the (void *) cast. Signed-off-by: Carlo Caione --- include/timeout_q.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/timeout_q.h b/include/timeout_q.h index 25185f8ba67..0615bf181d1 100644 --- a/include/timeout_q.h +++ b/include/timeout_q.h @@ -63,7 +63,7 @@ s32_t z_timeout_remaining(struct _timeout *timeout); /* Stubs when !CONFIG_SYS_CLOCK_EXISTS */ #define z_init_thread_timeout(t) do {} while (false) -#define z_add_thread_timeout(th, to) do {} while (false && (void *)to && (void *)th) +#define z_add_thread_timeout(th, to) do {} while (false && to && (void *)th) #define z_abort_thread_timeout(t) (0) #define z_is_inactive_timeout(t) 0 #define z_get_next_timeout_expiry() (K_FOREVER)