#4782: used uninitialized variable
---------------------------------------+-------------------------
        Reporter:  andrvaut            |      Owner:
            Type:  bug                 |     Status:  new
        Priority:  normal              |  Milestone:  unspecified
       Component:  Engine: Networking  |    Version:  git/master
Operating System:  All/Non-Specific    |
---------------------------------------+-------------------------
 When you build with the -o3 optimization key, an error occurs:

 {{{
 nettypes.cpp: In function ‘void NETwzstring(WzString&)’:
 nettypes.cpp:91:10: error: ‘c’ may be used uninitialized in this function
 [-Werror=maybe-uninitialized]
   uint8_t b[2] = {uint8_t(v >> 8), uint8_t(v)};
           ^
 nettypes.cpp:694:12: note: ‘c’ was declared here
    uint16_t c;
             ^
 }}}

 gcc 7.3.0

--
Ticket URL: <http://developer.wz2100.net/ticket/4782>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project

Reply via email to