Well, it's just the same as initializing numbers to 0 - cppcheck is 
complaining, so I'm trying to get rid of that noise in the report.

The actual error message is:

src/game_io/game_preload_packet.h:38: (style) The struct 'GamePreloadPacket' 
does not have a constructor although it has private member variables. Member 
variables of builtin types are left uninitialized when the class is 
instantiated. That may cause bugs or undefined behavior.

I then proceeded to create a constructor, and you then advised to directly 
initialize the variables.

The only way to test if this will shut up cppcheck is to run the full report 
again.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-986611-cppcheck-uninitialized-variables/+merge/326256
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-986611-cppcheck-uninitialized-variables.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to