From 992544648b32dcee338585401fa6df60cef992a2 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 24 Dec 2021 21:40:48 +0300 Subject: Eliminate 'old_gc_no is initialized but not referenced' MS VC false warning * win32_threads.c [GC_DISABLE_INCREMENTAL] (GC_wait_for_gc_completion): Define as no-op macro (instead of a static function). --- win32_threads.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'win32_threads.c') diff --git a/win32_threads.c b/win32_threads.c index 2d4bfa55..452c22f6 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -822,6 +822,9 @@ GC_API int GC_CALL GC_register_my_thread(const struct GC_stack_base *sb) } } +#ifdef GC_DISABLE_INCREMENTAL +# define GC_wait_for_gc_completion(wait_for_all) (void)(wait_for_all) +#else /* Similar to that in pthread_support.c. */ STATIC void GC_wait_for_gc_completion(GC_bool wait_for_all) { @@ -845,6 +848,7 @@ STATIC void GC_wait_for_gc_completion(GC_bool wait_for_all) && (wait_for_all || old_gc_no == GC_gc_no)); } } +#endif /* !GC_DISABLE_INCREMENTAL */ GC_API int GC_CALL GC_unregister_my_thread(void) { -- cgit v1.2.1