From 0f28c676779f12eaed2f86f961098cd5ce212c75 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 21 Jul 2017 19:34:10 +0300 Subject: [PATCH] Workaround false 'uninitialized var use' code defect (initsecondarythread) * tests/initsecondarythread.c [GC_PTHREADS && LINT2] (main): Initialize "t" local variable to some value (e.g. result of pthread_create()). --- tests/initsecondarythread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/initsecondarythread.c b/tests/initsecondarythread.c index 73cc298d..3b2040db 100644 --- a/tests/initsecondarythread.c +++ b/tests/initsecondarythread.c @@ -60,6 +60,10 @@ int main(void) # ifdef GC_PTHREADS int code; pthread_t t; + +# ifdef LINT2 + t = pthread_self(); /* explicitly initialize to some value */ +# endif # else HANDLE t; DWORD thread_id; -- 2.40.0