Skip to main content
GameDev.net gamedev.net
🔒 Locked

[C++] MingW warning in one of the stock sources?

Started by Decrius Feb 3, 2009 at 8:08 AM 0 replies 1.1k views
Original Post
Decrius
Decrius
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:
Class::Class(const Class &instance) :
        i_am_a_map(instance.i_am_a_map)
    {
        ...
    }

Am I doing anything wrong? Can I ignore it? Or _can_ it be unsafe / bad coding? Thanks.
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.