From eb81ab1b1c543f6f37cbb46a676a9549096ecc47 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 13 Nov 2018 11:02:49 +0300 Subject: Workaround 'local address assignment to a global variable' CSA warning * include/gc.h [(!__GNUC__ || __INTEL_COMPILER) && LINT2] (GC_reachable_here): Transform ptr in the same way as COVERT_DATAFLOW() does. * mach_dep.c (GC_with_callee_saves_pushed): Transform the argument of GC_noop1() by COVERT_DATAFLOW(). * misc.c [!ASM_CLEAR_CODE] (GC_clear_stack_inner): Likewise. * misc.c (GC_call_with_stack_base, GC_call_with_gc_active): Likewise. * pthread_support.c (GC_call_with_gc_active): Likewise. * win32_threads.c (GC_call_with_gc_active): Likewise. * misc.c (GC_call_with_gc_active): Transform &stacksect by COVERT_DATAFLOW() when storing to GC_stackbottom. * pthread_support.c (GC_call_with_gc_active): Likewise. --- pthread_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pthread_support.c') diff --git a/pthread_support.c b/pthread_support.c index 8738732d..4105077f 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -1424,7 +1424,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn, } else { /* The original stack. */ if ((word)GC_stackbottom HOTTER_THAN (word)(&stacksect)) - GC_stackbottom = (ptr_t)(&stacksect); + GC_stackbottom = (ptr_t)COVERT_DATAFLOW(&stacksect); } if (!me->thread_blocked) { @@ -1432,7 +1432,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn, UNLOCK(); client_data = fn(client_data); /* Prevent treating the above as a tail call. */ - GC_noop1((word)(&stacksect)); + GC_noop1(COVERT_DATAFLOW(&stacksect)); return client_data; /* result */ } -- cgit v1.2.1