projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd18622
)
Eliminate 'potential overflow' static analyzer warning in test
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 4 Oct 2016 07:28:18 +0000
(10:28 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 4 Oct 2016 07:28:18 +0000
(10:28 +0300)
* tests/subthread_create.c (entry): Replace (int)(int_v1 - uint_v2)
expression with int_v1 - (int)uint_v2.
tests/subthread_create.c
patch
|
blob
|
history
diff --git
a/tests/subthread_create.c
b/tests/subthread_create.c
index
be57896
..
fb1a728
100644
(file)
--- 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;