Polynomials: fix CID 1363767 : uninit variable 90/18990/2
Clément DAVID [Fri, 27 Jan 2017 10:17:30 +0000 (11:17 +0100)]
Change-Id: I56dad01201d9074f0be030f764ec5a465c724fb5

scilab/modules/polynomials/src/cpp/find_polynomial_roots_jenkins_traub.cc

index 66eff60..8b2b8a9 100644 (file)
@@ -602,7 +602,8 @@ bool JenkinsTraubSolver::ApplyLinearShiftToKPolynomial(
                           EvaluatePolynomial(k_polynomial_, root)).real();
 
   VectorXd deflated_polynomial, deflated_k_polynomial;
-  double polynomial_at_root, k_polynomial_at_root;
+  double polynomial_at_root = std::numeric_limits<double>::max();
+  double k_polynomial_at_root;
 
   // This container maintains a history of the predicted roots. The convergence
   // of the algorithm is determined by the convergence of the root value.