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

set values for variables that could be used uninitialized #63

Merged
merged 1 commit into from
Jun 28, 2018

Conversation

procopiostein
Copy link

@procopiostein procopiostein commented Mar 15, 2018

The build fails when enabling the flag -Werror=maybe-uninitialized

10:41:15 make[4]: Leaving directory '/tmp/buildd/laser-filters-1.8.5/obj-x86_64-linux-gnu'
10:41:15 [ 64%] Built target pointcloud_filters
10:41:18 In file included from /opt/ros/kinetic/include/tf/LinearMath/Matrix3x3.h:19:0,
10:41:18 from /opt/ros/kinetic/include/tf/LinearMath/Transform.h:21,
10:41:18 from /opt/ros/kinetic/include/tf/transform_datatypes.h:41,
10:41:18 from /opt/ros/kinetic/include/tf/time_cache.h:38,
10:41:18 from /opt/ros/kinetic/include/tf/tf.h:43,
10:41:18 from /opt/ros/kinetic/include/laser_geometry/laser_geometry.h:40,
10:41:18 from /tmp/buildd/laser-filters-1.8.5/include/laser_filters/box_filter.h:54,
10:41:18 from /tmp/buildd/laser-filters-1.8.5/src/box_filter.cpp:45:
10:41:18 /opt/ros/kinetic/include/tf/LinearMath/Vector3.h: In member function 'virtual bool laser_filters::LaserScanBoxFilter::configure()':
10:41:18
/opt/ros/kinetic/include/tf/LinearMath/Vector3.h:259:61: error: 'min_z' may be used uninitialized in this function [-Werror=maybe-uninitialized]

10:41:18 TFSIMD_FORCE_INLINE void setZ(tfScalar z) {m_floats[2] = z;};
10:41:18 ^
10:41:18 /tmp/buildd/laser-filters-1.8.5/src/box_filter.cpp:54:24: note: 'min_z' was declared here
10:41:18 double min_x, min_y, min_z, max_x, max_y, max_z;

@jonbinney jonbinney merged commit f3f7a10 into ros-perception:indigo-devel Jun 28, 2018
@jonbinney
Copy link
Contributor

Thanks @procopiostein !

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

Successfully merging this pull request may close these issues.

2 participants