From c5665f2e8e3749398c7e997067e74c5d02081163 Mon Sep 17 00:00:00 2001 From: Bradley Bolen Date: Fri, 17 May 2019 14:57:48 -0400 Subject: [PATCH] arch: arc: Fix checks of CONFIG_STACK_POINTER_RANDOM The compiler generates errors of the form error: "CONFIG_STACK_POINTER_RANDOM" is not defined, evaluates to 0 [-Werror=undef] when -Wundef is used and the config option was turned off. Change check to if defined(). Signed-off-by: Bradley Bolen --- arch/arc/core/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/core/thread.c b/arch/arc/core/thread.c index 1e7b2df5f7a..39f8e136a75 100644 --- a/arch/arc/core/thread.c +++ b/arch/arc/core/thread.c @@ -87,7 +87,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack, #endif stackEnd = pStackMem + stackAdjSize; -#if CONFIG_STACK_POINTER_RANDOM +#ifdef CONFIG_STACK_POINTER_RANDOM offset = stackAdjSize - stackSize; #endif