1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Fixed issues found by static analysis (mostly DBZ)

This commit is contained in:
Maksim Shabunin
2018-07-17 16:14:54 +03:00
parent 78d07e841d
commit 1da46fe6fb
26 changed files with 71 additions and 19 deletions
+1
View File
@@ -616,6 +616,7 @@ public:
expDiffSum += v; // sum_j(exp(L_ij - L_iq))
}
CV_Assert(expDiffSum > 0);
if(probs)
L.convertTo(*probs, ptype, 1./expDiffSum);
+1
View File
@@ -170,6 +170,7 @@ public:
double val = std::abs(w->ord_responses[w->sidx[i]]);
max_response = std::max(max_response, val);
}
CV_Assert(fabs(max_response) > 0);
}
if( rparams.calcVarImportance )
+1 -1
View File
@@ -630,7 +630,7 @@ void DTreesImpl::calcValue( int nidx, const vector<int>& _sidx )
w->cv_Tn[nidx*cv_n + j] = INT_MAX;
}
}
CV_Assert(fabs(sumw) > 0);
node->node_risk = sum2 - (sum/sumw)*sum;
node->node_risk /= sumw;
node->value = sum/sumw;