Coverity #1350601 Fixed 89/17989/2
Aashish Misraa [Sun, 27 Mar 2016 09:14:32 +0000 (14:14 +0530)]
Change-Id: I60eeaed9d3fa9545e17ad645c1816a86d6b096fd

scilab/modules/linear_algebra/sci_gateway/cpp/sci_lsq.cpp

index 835b4f7..4e0346b 100644 (file)
@@ -37,6 +37,7 @@ types::Function::ReturnValue sci_lsq(types::typed_list &in, int _iRetCount, type
     double* pdTol               = NULL;
     bool bComplexArgs           = false;
     int iRank                   = 0;
+    double dblTol               = 0.0; 
 
     if (in.size() < 2 || in.size() > 3)
     {
@@ -76,7 +77,7 @@ types::Function::ReturnValue sci_lsq(types::typed_list &in, int _iRetCount, type
             return types::Function::Error;
         }
 
-        double dblTol = in[2]->getAs<types::Double>()->get(0);
+        dblTol = in[2]->getAs<types::Double>()->get(0);
         pdTol = &dblTol;
     }