changeset 13828:f1b023fd098d

always initialize info and rcon in Matrix determinant methods * dMatrix.cc (Matrix::determinant): Always initialize info and rcon. * CMatrix.cc (ComplexMatrix::determinant): Likewise. * fMatrix.cc (FloatMatrix::determinant): Likewise. * fCMatrix.cc (FloatComplexMatrix::determinant): Likewise.
author John W. Eaton <jwe@octave.org>
date Sat, 05 Nov 2011 01:59:40 -0400
parents 822f80b90866
children 8e25d6d1db10
files liboctave/CMatrix.cc liboctave/dMatrix.cc liboctave/fCMatrix.cc liboctave/fMatrix.cc
diffstat 4 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CMatrix.cc	Fri Nov 04 20:09:02 2011 -0700
+++ b/liboctave/CMatrix.cc	Sat Nov 05 01:59:40 2011 -0400
@@ -1571,6 +1571,9 @@
 {
   ComplexDET retval (1.0);
 
+  info = 0;
+  rcon = 0.0;
+
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1599,7 +1602,6 @@
           ComplexMatrix atmp = *this;
           Complex *tmp_data = atmp.fortran_vec ();
 
-          info = 0;
           double anorm = 0;
           if (calc_cond) anorm = xnorm (*this, 1);
 
--- a/liboctave/dMatrix.cc	Fri Nov 04 20:09:02 2011 -0700
+++ b/liboctave/dMatrix.cc	Sat Nov 05 01:59:40 2011 -0400
@@ -1239,6 +1239,9 @@
 {
   DET retval (1.0);
 
+  info = 0;
+  rcon = 0.0;
+
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1267,7 +1270,6 @@
           Matrix atmp = *this;
           double *tmp_data = atmp.fortran_vec ();
 
-          info = 0;
           double anorm = 0;
           if (calc_cond) anorm = xnorm (*this, 1);
 
--- a/liboctave/fCMatrix.cc	Fri Nov 04 20:09:02 2011 -0700
+++ b/liboctave/fCMatrix.cc	Sat Nov 05 01:59:40 2011 -0400
@@ -1567,6 +1567,9 @@
 {
   FloatComplexDET retval (1.0);
 
+  info = 0;
+  rcon = 0.0;
+
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1595,7 +1598,6 @@
           FloatComplexMatrix atmp = *this;
           FloatComplex *tmp_data = atmp.fortran_vec ();
 
-          info = 0;
           float anorm = 0;
           if (calc_cond) anorm = xnorm (*this, 1);
 
--- a/liboctave/fMatrix.cc	Fri Nov 04 20:09:02 2011 -0700
+++ b/liboctave/fMatrix.cc	Sat Nov 05 01:59:40 2011 -0400
@@ -1239,6 +1239,9 @@
 {
   FloatDET retval (1.0);
 
+  info = 0;
+  rcon = 0.0;
+
   octave_idx_type nr = rows ();
   octave_idx_type nc = cols ();
 
@@ -1267,7 +1270,6 @@
           FloatMatrix atmp = *this;
           float *tmp_data = atmp.fortran_vec ();
 
-          info = 0;
           float anorm = 0;
           if (calc_cond) anorm = xnorm (*this, 1);