From 478de03bd8d91ab6238f322ed4783daa71a97b40 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 5 Nov 2011 23:30:49 +0100 Subject: [PATCH] fix a couple of warnings in the unit tests --- Eigen/src/Eigen2Support/Geometry/All.h | 2 +- test/cwiseop.cpp | 7 ++----- test/eigen2support.cpp | 1 - test/geo_eulerangles.cpp | 1 - test/geo_homogeneous.cpp | 10 +++------- test/geo_orthomethods.cpp | 4 +--- unsupported/test/mpreal/dlmalloc.h | 2 +- 7 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Eigen/src/Eigen2Support/Geometry/All.h b/Eigen/src/Eigen2Support/Geometry/All.h index 9d8244b07..e0b00fccc 100644 --- a/Eigen/src/Eigen2Support/Geometry/All.h +++ b/Eigen/src/Eigen2Support/Geometry/All.h @@ -112,4 +112,4 @@ #undef Hyperplane #undef ParametrizedLine -#endif // EIGEN2_GEOMETRY_MODULE_H \ No newline at end of file +#endif // EIGEN2_GEOMETRY_MODULE_H diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index 571c5a800..b3ca94e3a 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -60,11 +60,8 @@ template void cwiseops(const MatrixType& m) mzero = MatrixType::Zero(rows, cols), mones = MatrixType::Ones(rows, cols), identity = Matrix - ::Identity(rows, rows), - square = Matrix::Random(rows, rows); - VectorType v1 = VectorType::Random(rows), - v2 = VectorType::Random(rows), - vzero = VectorType::Zero(rows), + ::Identity(rows, rows); + VectorType vzero = VectorType::Zero(rows), vones = VectorType::Ones(rows), v3(rows); diff --git a/test/eigen2support.cpp b/test/eigen2support.cpp index a7269fed5..5d0202e34 100644 --- a/test/eigen2support.cpp +++ b/test/eigen2support.cpp @@ -35,7 +35,6 @@ template void eigen2support(const MatrixType& m) Index cols = m.cols(); MatrixType m1 = MatrixType::Random(rows, cols), - m2 = MatrixType::Random(rows, cols), m3(rows, cols); Scalar s1 = internal::random(), diff --git a/test/geo_eulerangles.cpp b/test/geo_eulerangles.cpp index f82cb8fbe..8029a694e 100644 --- a/test/geo_eulerangles.cpp +++ b/test/geo_eulerangles.cpp @@ -42,7 +42,6 @@ template void eulerangles(void) #define VERIFY_EULER(I,J,K, X,Y,Z) { \ Vector3 ea = m.eulerAngles(I,J,K); \ - Matrix3 m1 = Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z())); \ VERIFY_IS_APPROX(m, Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z()))); \ } VERIFY_EULER(0,1,2, X,Y,Z); diff --git a/test/geo_homogeneous.cpp b/test/geo_homogeneous.cpp index 26254b757..3efcb77db 100644 --- a/test/geo_homogeneous.cpp +++ b/test/geo_homogeneous.cpp @@ -42,17 +42,13 @@ template void homogeneous(void) typedef Matrix T3MatrixType; VectorType v0 = VectorType::Random(), - v1 = VectorType::Random(), ones = VectorType::Ones(); - HVectorType hv0 = HVectorType::Random(), - hv1 = HVectorType::Random(); + HVectorType hv0 = HVectorType::Random(); - MatrixType m0 = MatrixType::Random(), - m1 = MatrixType::Random(); + MatrixType m0 = MatrixType::Random(); - HMatrixType hm0 = HMatrixType::Random(), - hm1 = HMatrixType::Random(); + HMatrixType hm0 = HMatrixType::Random(); hv0 << v0, 1; VERIFY_IS_APPROX(v0.homogeneous(), hv0); diff --git a/test/geo_orthomethods.cpp b/test/geo_orthomethods.cpp index 020ae7103..aa3c8b61d 100644 --- a/test/geo_orthomethods.cpp +++ b/test/geo_orthomethods.cpp @@ -88,9 +88,7 @@ template void orthomethods(int size=Size) typedef Matrix MatrixN3; typedef Matrix Vector3; - VectorType v0 = VectorType::Random(size), - v1 = VectorType::Random(size), - v2 = VectorType::Random(size); + VectorType v0 = VectorType::Random(size); // unitOrthogonal VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1)); diff --git a/unsupported/test/mpreal/dlmalloc.h b/unsupported/test/mpreal/dlmalloc.h index a90dcb6f5..ac46f0845 100755 --- a/unsupported/test/mpreal/dlmalloc.h +++ b/unsupported/test/mpreal/dlmalloc.h @@ -556,7 +556,7 @@ int mspace_mallopt(int, int); #endif /* MSPACES */ #ifdef __cplusplus -}; /* end of extern "C" */ +} /* end of extern "C" */ #endif #endif /* MALLOC_280_H */