[opencv] 23/33: fixed "Conditional jump or move depends on uninitialised value(s)" in GBD
Mattia Rizzolo
mattia at debian.org
Tue Oct 4 17:51:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to annotated tag 2.4.12.2
in repository opencv.
commit d50c07e303d5bacbdfc5cfdda4767e7485106beb
Author: Ilya Lavrenov <ilya.lavrenov at itseez.com>
Date: Tue Sep 1 13:22:49 2015 +0300
fixed "Conditional jump or move depends on uninitialised value(s)" in GBD
(cherry picked from commit 887736bcd4365cff0531e6f763b604a1c6e92e25)
---
modules/ml/src/gbt.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/ml/src/gbt.cpp b/modules/ml/src/gbt.cpp
index aeaf669..9ed6b4c 100644
--- a/modules/ml/src/gbt.cpp
+++ b/modules/ml/src/gbt.cpp
@@ -259,7 +259,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
for (int i=1; i<n; ++i)
{
int k = 0;
- while ((int(orig_response->data.fl[i]) - class_labels->data.i[k]) && (k<j))
+ while ((k<j) && (int(orig_response->data.fl[i]) - class_labels->data.i[k]))
k++;
if (k == j)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list