Original Post
Hi, whenever I compile my sources, I get warnings like these: E:/Compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h: In member function `typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_copy(const std::_Rb_tree_node<_Val>*, std::_Rb_tree_node<_Val>*) [with _Key = DaevsGUI::EventID, _Val = std::pair, _KeyOfValue = std::_Select1st >, _Compare = std::less, _Alloc = std::allocator >]': E:/Compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:1029: warning: '__top' might be used uninitialized in this function E:/Compilers/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:365: warning: '__tmp' might be used uninitialized in this function This generally happens when I copy a std::map in a constructor, like: Am I doing anything wrong? Can I ignore it? Or _can_ it be unsafe / bad coding? Thanks.
Class::Class(const Class &instance) :
i_am_a_map(instance.i_am_a_map)
{
...
}