[eigen-commits] commit/eigen: bjacob: fix more variable-set-but-not-used warnings on gcc 4.6

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen-commits Archives ]


1 new commit in eigen:


https://bitbucket.org/eigen/eigen/changeset/5bc7055ecbb3/
changeset:   5bc7055ecbb3
user:        bjacob
date:        2011-10-31 05:51:36
summary:     fix more variable-set-but-not-used warnings on gcc 4.6
affected #:  10 files

diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/adjoint.cpp
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -43,8 +43,6 @@
   MatrixType m1 = MatrixType::Random(rows, cols),
              m2 = MatrixType::Random(rows, cols),
              m3(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
-             identity = SquareMatrixType::Identity(rows, rows),
              square = SquareMatrixType::Random(rows, rows);
   VectorType v1 = VectorType::Random(rows),
              v2 = VectorType::Random(rows),


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/block.cpp
--- a/test/block.cpp
+++ b/test/block.cpp
@@ -42,12 +42,8 @@
              m1_copy = m1,
              m2 = MatrixType::Random(rows, cols),
              m3(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
              ones = MatrixType::Ones(rows, cols);
-  VectorType v1 = VectorType::Random(rows),
-             v2 = VectorType::Random(rows),
-             v3 = VectorType::Random(rows),
-             vzero = VectorType::Zero(rows);
+  VectorType v1 = VectorType::Random(rows);
 
   Scalar s1 = internal::random<Scalar>();
 


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/cholesky.cpp
--- a/test/cholesky.cpp
+++ b/test/cholesky.cpp
@@ -325,4 +325,6 @@
   // Test problem size constructors
   CALL_SUBTEST_9( LLT<MatrixXf>(10) );
   CALL_SUBTEST_9( LDLT<MatrixXf>(10) );
+  
+  EIGEN_UNUSED_VARIABLE(s)
 }


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/determinant.cpp
--- a/test/determinant.cpp
+++ b/test/determinant.cpp
@@ -78,4 +78,5 @@
     s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);
     CALL_SUBTEST_6( determinant(MatrixXd(s, s)) );
   }
+  EIGEN_UNUSED_VARIABLE(s)
 }


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/inverse.cpp
--- a/test/inverse.cpp
+++ b/test/inverse.cpp
@@ -41,7 +41,6 @@
 
   MatrixType m1(rows, cols),
              m2(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
              identity = MatrixType::Identity(rows, rows);
   createRandomPIMatrixOfRank(rows,rows,rows,m1);
   m2 = m1.inverse();
@@ -114,4 +113,5 @@
     CALL_SUBTEST_7( inverse(Matrix4d()) );
     CALL_SUBTEST_7( inverse(Matrix<double,4,4,DontAlign>()) );
   }
+  EIGEN_UNUSED_VARIABLE(s)
 }


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/nomalloc.cpp
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -52,15 +52,7 @@
 
   MatrixType m1 = MatrixType::Random(rows, cols),
              m2 = MatrixType::Random(rows, cols),
-             m3(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
-             identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Identity(rows, rows),
-             square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Random(rows, rows);
-  VectorType v1 = VectorType::Random(rows),
-             v2 = VectorType::Random(rows),
-             vzero = VectorType::Zero(rows);
+             m3(rows, cols);
 
   Scalar s1 = internal::random<Scalar>();
 


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/product.h
--- a/test/product.h
+++ b/test/product.h
@@ -54,8 +54,7 @@
   // to test it, hence I consider that we will have tested Random.h
   MatrixType m1 = MatrixType::Random(rows, cols),
              m2 = MatrixType::Random(rows, cols),
-             m3(rows, cols),
-             mzero = MatrixType::Zero(rows, cols);
+             m3(rows, cols);
   RowSquareMatrixType
              identity = RowSquareMatrixType::Identity(rows, rows),
              square = RowSquareMatrixType::Random(rows, rows),
@@ -63,9 +62,7 @@
   ColSquareMatrixType
              square2 = ColSquareMatrixType::Random(cols, cols),
              res2 = ColSquareMatrixType::Random(cols, cols);
-  RowVectorType v1 = RowVectorType::Random(rows),
-             v2 = RowVectorType::Random(rows),
-             vzero = RowVectorType::Zero(rows);
+  RowVectorType v1 = RowVectorType::Random(rows);
   ColVectorType vc2 = ColVectorType::Random(cols), vcres(cols);
   OtherMajorMatrixType tm1 = m1;
 


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/product_trmv.cpp
--- a/test/product_trmv.cpp
+++ b/test/product_trmv.cpp
@@ -100,4 +100,5 @@
     s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);
     CALL_SUBTEST_6( trmv(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) );
   }
+  EIGEN_UNUSED_VARIABLE(s);
 }


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/selfadjoint.cpp
--- a/test/selfadjoint.cpp
+++ b/test/selfadjoint.cpp
@@ -54,7 +54,8 @@
 
 void bug_159()
 {
-  Matrix3d m = Matrix3d::Random().selfadjointView<Lower>(); 
+  Matrix3d m = Matrix3d::Random().selfadjointView<Lower>();
+  EIGEN_UNUSED_VARIABLE(m)
 }
 
 void test_selfadjoint()
@@ -68,6 +69,8 @@
     CALL_SUBTEST_3( selfadjoint(Matrix3cf()) );
     CALL_SUBTEST_4( selfadjoint(MatrixXcd(s,s)) );
     CALL_SUBTEST_5( selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) );
+    
+    EIGEN_UNUSED_VARIABLE(s)
   }
   
   CALL_SUBTEST_1( bug_159() );


diff -r 13342df27e02bb7df69e151318355fbf513d7db8 -r 5bc7055ecbb38e5480ba3e3fcb7178eb55607e12 test/triangular.cpp
--- a/test/triangular.cpp
+++ b/test/triangular.cpp
@@ -42,16 +42,8 @@
              m3(rows, cols),
              m4(rows, cols),
              r1(rows, cols),
-             r2(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
-             mones = MatrixType::Ones(rows, cols),
-             identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Identity(rows, rows),
-             square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Random(rows, rows);
-  VectorType v1 = VectorType::Random(rows),
-             v2 = VectorType::Random(rows),
-             vzero = VectorType::Zero(rows);
+             r2(rows, cols);
+  VectorType v2 = VectorType::Random(rows);
 
   MatrixType m1up = m1.template triangularView<Upper>();
   MatrixType m2up = m2.template triangularView<Upper>();
@@ -158,16 +150,7 @@
              m3(rows, cols),
              m4(rows, cols),
              r1(rows, cols),
-             r2(rows, cols),
-             mzero = MatrixType::Zero(rows, cols),
-             mones = MatrixType::Ones(rows, cols);
-  RMatrixType identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Identity(rows, rows),
-              square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
-                              ::Random(rows, rows);
-  VectorType v1 = VectorType::Random(rows),
-             v2 = VectorType::Random(rows),
-             vzero = VectorType::Zero(rows);
+             r2(rows, cols);
 
   MatrixType m1up = m1.template triangularView<Upper>();
   MatrixType m2up = m2.template triangularView<Upper>();
@@ -237,7 +220,8 @@
 
 void bug_159()
 {
-  Matrix3d m = Matrix3d::Random().triangularView<Lower>(); 
+  Matrix3d m = Matrix3d::Random().triangularView<Lower>();
+  EIGEN_UNUSED_VARIABLE(m)
 }
 
 void test_triangular()

Repository URL: https://bitbucket.org/eigen/eigen/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/