Skip to content
Permalink
Browse files

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 <bbolen@lexmark.com>
  • Loading branch information...
Bradley Bolen authored and nashif committed May 17, 2019
1 parent d2ef19b commit c5665f2e8e3749398c7e997067e74c5d02081163
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit c5665f2

Please sign in to comment.
You can’t perform that action at this time.