← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-986611-cppcheck-uninitialized-variables into lp:widelands

 

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.


References