From: Ivan Maidanski Date: Tue, 4 Oct 2016 07:28:18 +0000 (+0300) Subject: Eliminate 'potential overflow' static analyzer warning in test X-Git-Tag: v8.0.0~1123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e248d685833a498e7dc0938bca47f08dfa611cd5;p=gc Eliminate 'potential overflow' static analyzer warning in test * tests/subthread_create.c (entry): Replace (int)(int_v1 - uint_v2) expression with int_v1 - (int)uint_v2. --- diff --git a/tests/subthread_create.c b/tests/subthread_create.c index be578965..fb1a728d 100644 --- a/tests/subthread_create.c +++ b/tests/subthread_create.c @@ -54,7 +54,7 @@ volatile AO_t thread_ended_cnt = 0; if (my_depth <= MAX_SUBTHREAD_DEPTH && thread_num < MAX_SUBTHREAD_COUNT && (thread_num % DECAY_DENOM) < DECAY_NUMER - && (int)(thread_num - AO_load(&thread_ended_cnt)) + && thread_num - (int)AO_load(&thread_ended_cnt) <= MAX_ALIVE_THREAD_COUNT) { # ifdef GC_PTHREADS int err;