From: Ivan Maidanski Date: Thu, 17 Nov 2016 07:13:12 +0000 (+0300) Subject: Workaround 'GC_DllMain is never used' cppcheck style warning X-Git-Tag: v7.6.2~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0bc4bda6c63051b91b83bd2319b2e277fc85490;p=gc Workaround 'GC_DllMain is never used' cppcheck style warning * win32_threads.c [GC_WIN32_THREADS] (GC_init_parallel): Call GC_noop1(&GC_DllMain) if CPPCHECK (and not GC_NO_THREADS_DISCOVERY). --- diff --git a/win32_threads.c b/win32_threads.c index 60f2f63d..5ff3c638 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -2812,6 +2812,9 @@ GC_INNER void GC_init_parallel(void) /* GC_init() calls us back, so set flag first. */ if (!GC_is_initialized) GC_init(); +# if defined(CPPCHECK) && !defined(GC_NO_THREADS_DISCOVERY) + GC_noop1((word)&GC_DllMain); +# endif # ifndef GC_ALWAYS_MULTITHREADED if (GC_win32_dll_threads) { GC_need_to_lock = TRUE;