diff --git a/src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic_impl.hpp b/src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic_impl.hpp index 6a61e919a0e..fd27a270caa 100644 --- a/src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic_impl.hpp +++ b/src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic_impl.hpp @@ -25,7 +25,7 @@ size_t RPlusTreeDescentHeuristic::ChooseDescentNode(TreeType* node, { typedef typename TreeType::ElemType ElemType; size_t bestIndex = 0; - bool success; + bool success = true; // Try to find a node that contains the point. for (bestIndex = 0; bestIndex < node->NumChildren(); bestIndex++)