]> granicus.if.org Git - gc/commitdiff
Workaround 'GC_DllMain is never used' cppcheck style warning
authorIvan Maidanski <ivmai@mail.ru>
Thu, 17 Nov 2016 07:13:12 +0000 (10:13 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 17 Nov 2016 07:13:12 +0000 (10:13 +0300)
* win32_threads.c [GC_WIN32_THREADS] (GC_init_parallel): Call
GC_noop1(&GC_DllMain) if CPPCHECK (and not GC_NO_THREADS_DISCOVERY).

win32_threads.c

index 60f2f63db549c386fa1052f0e628963cde91961d..5ff3c638a6f763c7e0df5b2e986d2c2071f8e4f2 100644 (file)
@@ -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;