From 16b2001eceac03a3adf981f4bc02b72583433ab1 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 7 Oct 2018 21:54:49 +0200 Subject: Fix gcc 8.1 warning: "maybe use uninitialized" --- test/stdvector_overload.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/stdvector_overload.cpp') diff --git a/test/stdvector_overload.cpp b/test/stdvector_overload.cpp index 5c042a64c..da04f8a84 100644 --- a/test/stdvector_overload.cpp +++ b/test/stdvector_overload.cpp @@ -31,7 +31,7 @@ void check_stdvector_matrix(const MatrixType& m) Index rows = m.rows(); Index cols = m.cols(); MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); - std::vector v(10, MatrixType(rows,cols)), w(20, y); + std::vector v(10, MatrixType::Zero(rows,cols)), w(20, y); v[5] = x; w[6] = v[5]; VERIFY_IS_APPROX(w[6], v[5]); @@ -100,8 +100,8 @@ template void check_stdvector_quaternion(const QuaternionType&) { typedef typename QuaternionType::Coefficients Coefficients; - QuaternionType x(Coefficients::Random()), y(Coefficients::Random()); - std::vector v(10), w(20, y); + QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity(); + std::vector v(10,qi), w(20, y); v[5] = x; w[6] = v[5]; VERIFY_IS_APPROX(w[6], v[5]); -- cgit v1.2.3