Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bodies.cpp: Variable may be used uninitialized #220

Open
AndyZe opened this issue May 1, 2022 · 0 comments
Open

bodies.cpp: Variable may be used uninitialized #220

AndyZe opened this issue May 1, 2022 · 0 comments

Comments

@AndyZe
Copy link
Member

AndyZe commented May 1, 2022

I just noticed this warning while building (ros2 branch):

--- stderr: geometric_shapes
In file included from /usr/include/eigen3/Eigen/Core:294,
                 from /usr/include/eigen3/Eigen/Geometry:11,
                 from /workspaces/ws_miso/src/geometric_shapes/include/geometric_shapes/aabb.h:34,
                 from /workspaces/ws_miso/src/geometric_shapes/include/geometric_shapes/bodies.h:35,
                 from /workspaces/ws_miso/src/geometric_shapes/src/bodies.cpp:31:
In member function ‘Eigen::PlainObjectBase<Derived>& Eigen::PlainObjectBase<Derived>::operator=(Eigen::PlainObjectBase<Derived>&&) [with Derived = Eigen::Matrix<double, 3, 1>]’,
    inlined from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&&) [with _Scalar = double; int _Rows = 3; int _Cols = 1; int _Options = 0; int _MaxRows = 3; int _MaxCols = 1]’ at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
    inlined from ‘virtual void bodies::ConvexMesh::useDimensions(const shapes::Shape*)’ at /workspaces/ws_miso/src/geometric_shapes/src/bodies.cpp:852:46:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: warning: ‘*(Eigen::DenseStorage<double, 3, 3, 1, 0>*)((char*)&<unnamed> + offsetof(Eigen::Vector3d, Eigen::Matrix<double, 3, 1, 0, 3, 1>::<unnamed>.Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::<unnamed>.Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::<unnamed>.Eigen::DenseBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::<unnamed>.Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 3>::<unnamed>.Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 1>::<unnamed>.Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 0>::<unnamed>))’ may be used uninitialized [-Wmaybe-uninitialized]
  504 |       m_storage = std::move(other.m_storage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant