[mlpack-git] mlpack-1.0.x: Backport r17377. (975f67e)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:06:44 EST 2015


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

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

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

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

    Backport r17377.


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

975f67ed0faef3b226f8c1c6d36b0cf3e3a8b250
 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