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:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user