summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-12-03 07:19:57 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-12-03 07:19:57 +0300
commit2ca78fcd59b33a90fd85cbcac7e6d0b5dd82bbdc (patch)
tree8499a6e7742164e6d71332461dc555626f2c9522
parent8c6e63c6bd6ee0c25e523f428b7ab53042ca87b3 (diff)
downloadbdwgc-2ca78fcd59b33a90fd85cbcac7e6d0b5dd82bbdc.tar.gz
Workaround 'info is not assigned' cppcheck FP if assertions on (OS X)
(fix of commit 9aa26e0b5) * darwin_stop_world.c [CPPCHECK] (GC_thread_resume): Initialize info.run_state value (to 0) before thread_info() call even if not DEBUG_THREADS.
-rw-r--r--darwin_stop_world.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 4bbf4042..0468aaec 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -664,7 +664,7 @@ GC_INLINE void GC_thread_resume(thread_act_t thread)
struct thread_basic_info info;
mach_msg_type_number_t outCount = THREAD_BASIC_INFO_COUNT;
-# if defined(CPPCHECK) && defined(DEBUG_THREADS)
+# ifdef CPPCHECK
info.run_state = 0;
# endif
kern_result = thread_info(thread, THREAD_BASIC_INFO,