Bug #79338 gcc 4.4 include boost1.5.9 indicating that parameter is uninitialized
Submitted: 19 Nov 2015 9:47 Modified: 14 Feb 2018 14:19
Reporter: wdf xsd Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.7.9 OS:CentOS (6.5 64bit)
Assigned to: CPU Architecture:Any

[19 Nov 2015 9:47] wdf xsd
Description:
Many warning occured when running cmake with gcc 4.4.7 and boost_1.59 on Centos6.5_64bit

*****************************************

/root/boost_1_59_0/boost/geometry/index/detail/rtree/pack_create.hpp:257: warning: ‘elements_box.boost::geometry::index::detail::rtree::pack<Gis_point, boost::geometry::index::detail::rtree::options<boost::geometry::index::linear<8ul, 2ul>, boost::geometry::index::detail::rtree::insert_default_tag, boost::geometry::index::detail::rtree::choose_by_content_diff_tag, boost::geometry::index::detail::rtree::split_default_tag, boost::geometry::index::detail::rtree::linear_tag, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::translator<boost::geometry::index::indexable<Gis_point>, boost::geometry::index::equal_to<Gis_point> >, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<std::allocator<Gis_point>, Gis_point, boost::geometry::index::linear<8ul, 2ul>, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag> >::expandable_box<boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> > >::m_box.boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian>::m_values[0ul]’ may be used uninitialized in this function
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"

How to repeat:
cmake . -DCMAKE_INSTALL_PREFIX=${base_path} -DMYSQL_DATADIR=${data_path} -DSYSCONFDIR=/etc -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/root/boost_1_59_0

Suggested fix:
Does it have functional problem?
[19 Nov 2015 11:09] MySQL Verification Team
Thank you for the bug report.

/home/miguel/boost_1_59_0/boost/geometry/index/detail/rtree/pack_create.hpp:257: warning: ‘elements_box.boost::geometry::index::detail::rtree::pack<Gis_point, boost::geometry::index::detail::rtree::options<boost::geometry::index::linear<8ul, 2ul>, boost::geometry::index::detail::rtree::insert_default_tag, boost::geometry::index::detail::rtree::choose_by_content_diff_tag, boost::geometry::index::detail::rtree::split_default_tag, boost::geometry::index::detail::rtree::linear_tag, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::translator<boost::geometry::index::indexable<Gis_point>, boost::geometry::index::equal_to<Gis_point> >, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<std::allocator<Gis_point>, Gis_point, boost::geometry::index::linear<8ul, 2ul>, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag> >::expandable_box<boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> > >::m_box.boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian>::m_values[1ul]’ may be used uninitialized in this function                                                       
/home/miguel/boost_1_59_0/boost/geometry/index/detail/rtree/pack_create.hpp:257: warning: ‘elements_box.boost::geometry::index::detail::rtree::pack<Gis_point, boost::geometry::index::detail::rtree::options<boost::geometry::index::linear<8ul, 2ul>, boost::geometry::index::detail::rtree::insert_default_tag, boost::geometry::index::detail::rtree::choose_by_content_diff_tag, boost::geometry::index::detail::rtree::split_default_tag, boost::geometry::index::detail::rtree::linear_tag, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::translator<boost::geometry::index::indexable<Gis_point>, boost::geometry::index::equal_to<Gis_point> >, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<std::allocator<Gis_point>, Gis_point, boost::geometry::index::linear<8ul, 2ul>, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag> >::expandable_box<boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> > >::m_box.boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian>::m_values[0ul]’ may be used uninitialized in this function                                                       
/home/miguel/boost_1_59_0/boost/geometry/index/detail/rtree/pack_create.hpp:257: warning: ‘elements_box.boost::geometry::index::detail::rtree::pack<Gis_point, boost::geometry::index::detail::rtree::options<boost::geometry::index::linear<8ul, 2ul>, boost::geometry::index::detail::rtree::insert_default_tag, boost::geometry::index::detail::rtree::choose_by_content_diff_tag, boost::geometry::index::detail::rtree::split_default_tag, boost::geometry::index::detail::rtree::linear_tag, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::translator<boost::geometry::index::indexable<Gis_point>, boost::geometry::index::equal_to<Gis_point> >, boost::geometry::model::box<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<std::allocator<Gis_point>, Gis_point, boost::geometry::index::linear<8ul, 2ul>,
[31 Jan 2018 13:35] Adam Wulkiewicz
In the implementation of rtree packing algorithm there is a wrapper around
bounding box which is initialized on first call to a member function instead
of in the constructor. It is also guaranteed that this function will be called because it relies on the R-tree node minimum number of elements which cannot be 0 (checked with assertions). This is by design, the box is initialized, in order to change it the algorithm would have to be redesigned.

So this is false positive and can be closed.

In Boost.Geometry it's also possible to enable debugging of point and box
models implemented in the library (e.g. for box model representing R-tree nodes' bounding box) by #defining BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING. So if you want to be sure if Boost.Geometry models used internally are initialized you can enable this in debug build.