[mlpack-git] master, mlpack-1.0.x: Initialize uninitialized variable (#336). (a330d5f)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:44:54 EST 2015
Repository : https://github.com/mlpack/mlpack
On branches: master,mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit a330d5f1518b7cbf1b0708f8da6467890c87a7b2
Author: Ryan Curtin <ryan at ratml.org>
Date: Sat Mar 1 19:37:38 2014 +0000
Initialize uninitialized variable (#336).
>---------------------------------------------------------------
a330d5f1518b7cbf1b0708f8da6467890c87a7b2
src/mlpack/methods/gmm/gmm_impl.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mlpack/methods/gmm/gmm_impl.hpp b/src/mlpack/methods/gmm/gmm_impl.hpp
index 2ff2e25..c5fa3fb 100644
--- a/src/mlpack/methods/gmm/gmm_impl.hpp
+++ b/src/mlpack/methods/gmm/gmm_impl.hpp
@@ -223,7 +223,7 @@ arma::vec GMM<FittingType>::Random() const
{
// Determine which Gaussian it will be coming from.
double gaussRand = math::Random();
- size_t gaussian;
+ size_t gaussian = 0;
double sumProb = 0;
for (size_t g = 0; g < gaussians; g++)
More information about the mlpack-git
mailing list