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

Fixs several problems found by static analysis

This commit is contained in:
Maksim Shabunin
2020-03-16 15:49:51 +03:00
parent 2a52e44bc6
commit 7e7bb3027c
4 changed files with 7 additions and 1 deletions
@@ -1323,6 +1323,7 @@ void quantized_counting_sort(const float a[], const int n,
const float quantum, const int nkeys,
int idx[/*n*/], int cum[/*nkeys + 1*/])
{
CV_Assert(nkeys > 0);
memset(cum, 0, sizeof(cum[0]) * (nkeys + 1));
// Count up the quantized values