I have, with this code:
100: graph_traits<
graph_t>::edge_iterator ei, eend;
101: for (
tie(ei, eend) =
boost::edges(graph); ei != eend; ei++) {
I know this is not a major problem, as for the final release I will remove the -Wall flag from the compilation
But then my question is why is the difference?
Using boost 1.54 under Ubuntu 14.04 this warning shows on line 100 about variable ei
/home/woodbri/work/pgrouting/src/apsp_johnson/src/apsp_johnson_boost_wrapper.cpp:100:40: warning:
'*((void*)(&
ei)+32).__gnu_cxx::__normal_iterator<boost::detail::stored_edge_property<long
unsigned int, Edge>*,
std::vector<boost::detail::stored_edge_property<long unsigned int,
Edge>,
std::allocator<boost::detail::stored_edge_property<long unsigned int, Edge> > > >::
_M_
current' may be used uninitialized in this function [-Wmaybe-uninitialized]
graph_traits<graph_t>::edge_iterator ei, eend;
the complete code can be found :
https://github.com/pgRouting/pgrouting/blob/develop/src/apsp_johnson/src/apsp_johnson_boost_wrapper.cpp#L100in the cmake the compiler flags are set like this:
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -fPIC -O2 -g -Wall -std=c++0x -frounding-math -Wno-deprecated")
Complete setup can be found:
https://github.com/pgRouting/pgrouting/blob/develop_2_1_0/CMakeLists.txt#L217This is a test that has boost 1.46.1, no warning shows I also don't get a warning with boost 1.55
https://travis-ci.org/pgRouting/pgrouting/jobs/72064827#L1834The complete conversation of the problem can be found here:
https://github.com/pgRouting/pgrouting/issues/373#issuecomment-123749888