Check and fix warnings produced from static checks
Check and fix warnings produced from static checks in Ubuntu 19.10
[37/646] Building CXX object ezC2X/core/CMakeFiles/core.dir/datahub/DataHubUtils.cpp.o
/usr/include/boost/algorithm/string/detail/classification.hpp:135:25: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/home2/markus.klein/git/ezcar2x/ezC2X/core/datahub/DataHubUtils.cpp:14:5: note: Calling 'split, std::allocator > >, const std::__cxx11::basic_string, boost::algorithm::detail::is_any_ofF>'
boost::split(pathElements, path, boost::is_any_of("/"));
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Calling 'token_finder>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/finder.hpp:222:20: note: Calling constructor for 'token_finderF>'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/detail/finder.hpp:554:25: note: Calling copy constructor for 'is_any_ofF'
m_Pred(Pred), m_eCompress(eCompress) {}
^
/usr/include/boost/algorithm/string/detail/classification.hpp:114:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/usr/include/boost/algorithm/string/detail/classification.hpp:123:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^
/usr/include/boost/algorithm/string/detail/finder.hpp:554:25: note: Returning from copy constructor for 'is_any_ofF'
m_Pred(Pred), m_eCompress(eCompress) {}
^
/usr/include/boost/algorithm/string/finder.hpp:222:20: note: Returning from constructor for 'token_finderF>'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Returned allocated memory
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/split.hpp:149:51: note: Calling '~is_any_ofF'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/detail/classification.hpp:135:25: note: Potential memory leak
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/usr/include/boost/algorithm/string/detail/classification.hpp:139:17: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
/home2/markus.klein/git/ezcar2x/ezC2X/core/datahub/DataHubUtils.cpp:14:5: note: Calling 'split, std::allocator > >, const std::__cxx11::basic_string, boost::algorithm::detail::is_any_ofF>'
boost::split(pathElements, path, boost::is_any_of("/"));
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Calling 'token_finder>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Calling copy constructor for 'is_any_ofF'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/detail/classification.hpp:114:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/usr/include/boost/algorithm/string/detail/classification.hpp:123:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Returning from copy constructor for 'is_any_ofF'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Calling '~is_any_ofF'
/usr/include/boost/algorithm/string/detail/classification.hpp:135:51: note: Left side of '&&' is false
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/usr/include/boost/algorithm/string/detail/classification.hpp:139:17: note: Potential memory leak
}
^
[549/646] Building CXX object ezC2X/network/CMakeFiles/network.dir/geonet/common/tracing/csv/FieldFactory.cpp.o
/usr/include/boost/algorithm/string/detail/classification.hpp:135:25: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/home2/markus.klein/git/ezcar2x/ezC2X/network/geonet/common/tracing/csv/FieldFactory.cpp:176:5: note: Calling 'split, std::allocator > >, std::__cxx11::basic_string, boost::algorithm::detail::is_any_ofF>'
boost::algorithm::split(selectedFields, fields, boost::algorithm::is_any_of(","));
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Calling 'token_finder>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/finder.hpp:222:20: note: Calling constructor for 'token_finderF>'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/detail/finder.hpp:554:25: note: Calling copy constructor for 'is_any_ofF'
m_Pred(Pred), m_eCompress(eCompress) {}
^
/usr/include/boost/algorithm/string/detail/classification.hpp:114:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/usr/include/boost/algorithm/string/detail/classification.hpp:123:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^
/usr/include/boost/algorithm/string/detail/finder.hpp:554:25: note: Returning from copy constructor for 'is_any_ofF'
m_Pred(Pred), m_eCompress(eCompress) {}
^
/usr/include/boost/algorithm/string/finder.hpp:222:20: note: Returning from constructor for 'token_finderF>'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Returned allocated memory
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/split.hpp:149:51: note: Calling '~is_any_ofF'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/detail/classification.hpp:135:25: note: Potential memory leak
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/usr/include/boost/algorithm/string/detail/classification.hpp:139:17: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
/home2/markus.klein/git/ezcar2x/ezC2X/network/geonet/common/tracing/csv/FieldFactory.cpp:176:5: note: Calling 'split, std::allocator > >, std::__cxx11::basic_string, boost::algorithm::detail::is_any_ofF>'
boost::algorithm::split(selectedFields, fields, boost::algorithm::is_any_of(","));
^
/usr/include/boost/algorithm/string/split.hpp:149:17: note: Calling 'token_finder>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Calling copy constructor for 'is_any_ofF'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/detail/classification.hpp:114:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/usr/include/boost/algorithm/string/detail/classification.hpp:123:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Returning from copy constructor for 'is_any_ofF'
return detail::token_finderF( Pred, eCompress );
^
/usr/include/boost/algorithm/string/finder.hpp:222:55: note: Calling '~is_any_ofF'
/usr/include/boost/algorithm/string/detail/classification.hpp:135:51: note: Left side of '&&' is false
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/usr/include/boost/algorithm/string/detail/classification.hpp:139:17: note: Potential memory leak
}
^
Edited by Markus Klein