boost::context::jump_fcontext(&from->fc_, to->fc_, reinterpret_cast<intptr_t>(to));
#else
BoostContext* ctx[2] = {from, to};
- void* fake_stack = nullptr;
+ ASAN_ONLY(void* fake_stack = nullptr);
ASAN_ONLY(to->asan_ctx_ = from);
ASAN_START_SWITCH(from->asan_stop_ ? nullptr : &fake_stack, to->asan_stack_, to->asan_stack_size_);
boost::context::detail::transfer_t arg = boost::context::detail::jump_fcontext(to->fc_, ctx);
inline void RawContext::swap(RawContext* from, RawContext* to)
{
- void* fake_stack = nullptr;
+ ASAN_ONLY(void* fake_stack = nullptr);
ASAN_ONLY(to->asan_ctx_ = from);
ASAN_START_SWITCH(from->asan_stop_ ? nullptr : &fake_stack, to->asan_stack_, to->asan_stack_size_);
raw_swapcontext(&from->stack_top_, to->stack_top_);
inline void UContext::swap(UContext* from, UContext* to)
{
- void* fake_stack = nullptr;
+ ASAN_ONLY(void* fake_stack = nullptr);
ASAN_ONLY(to->asan_ctx_ = from);
ASAN_START_SWITCH(from->asan_stop_ ? nullptr : &fake_stack, to->asan_stack_, to->asan_stack_size_);
swapcontext(&from->uc_, &to->uc_);
#else
#define ASAN_ONLY(expr) (void)0
#define ASAN_START_SWITCH(fake_stack_save, bottom, size) (void)0
-#define ASAN_FINISH_SWITCH(fake_stack_save, bottom_old, size_old) (void)(fake_stack_save)
+#define ASAN_FINISH_SWITCH(fake_stack_save, bottom_old, size_old) (void)0
#endif
#endif