1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #12391 from DEEPIR:master

fix some errors found by static analyzer. (#12391)

* fix possible divided by zero and by negative values

* only 4 elements are used in these arrays

* fix uninitialized member

* use boolean type for semantic boolean variables

* avoid invalid array index

* to avoid exception and because base64_beg is only used in this block

* use std::atomic<bool> to avoid thread control race condition
This commit is contained in:
cyy
2018-09-04 21:39:19 +08:00
committed by Alexander Alekhin
parent f826709452
commit 10fb88d027
9 changed files with 12 additions and 13 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ public:
std::atomic<int> completed_thread_count; // number of threads completed any activities on this job
int64 dummy2_[8]; // avoid cache-line reusing for the same atomics
volatile bool is_completed; // std::atomic_flag ?
std::atomic<bool> is_completed;
// TODO exception handling
};