[mlpack-git] mlpack-1.0.x: Backport r17377. (2cc5b25)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Jan 7 11:58:23 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/0000000000000000000000000000000000000000...904762495c039e345beba14c1142fd719b3bd50e

>---------------------------------------------------------------

commit 2cc5b25b6cdfaacecb9f0d7186400b66c0d3bf80
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Dec 7 19:34:01 2014 +0000

    Backport r17377.


>---------------------------------------------------------------

2cc5b25b6cdfaacecb9f0d7186400b66c0d3bf80
 src/mlpack/methods/det/dtree.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/methods/det/dtree.cpp b/src/mlpack/methods/det/dtree.cpp
index a19a5a3..d118a8f 100644
--- a/src/mlpack/methods/det/dtree.cpp
+++ b/src/mlpack/methods/det/dtree.cpp
@@ -173,9 +173,9 @@ bool DTree::FindSplit(const arma::mat& data,
     bool dimSplitFound = false;
     // Take an error estimate for this dimension.
     double minDimError = std::pow(points, 2.0) / (max - min);
-    double dimLeftError;
-    double dimRightError;
-    double dimSplitValue;
+    double dimLeftError = 0.0; // For -Wuninitialized.  These variables will
+    double dimRightError = 0.0; // always be set to something else before use.
+    double dimSplitValue = 0.0;
 
     // Find the log volume of all the other dimensions.
     double volumeWithoutDim = logVolume - std::log(max - min);



More information about the mlpack-git mailing list