diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-12-24 21:40:48 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-12-24 21:41:48 +0300 |
commit | 992544648b32dcee338585401fa6df60cef992a2 (patch) | |
tree | e247681dc642530a77588394e8c14be701f06dc3 | |
parent | 34681fd41557458bc5496f98069af8638a26bb41 (diff) | |
download | bdwgc-992544648b32dcee338585401fa6df60cef992a2.tar.gz |
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).
-rw-r--r-- | win32_threads.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |