Am 23.01.2011 13:18, schrieb ThorstenB:
> [...] So, member
> variables should be initialized manually in the constructor.
ok, so we need to find out where this does not happen and fix it.

> [...] Most compilers provide warnings for uninitialized
> local variables (on the stack), but unfortunately I don't know any compiler
> (yet) producing warning for uninitialized member variables.
looks like gcc's -Weffc++ does this. I've just compiled JSBSim
standalone with this flag and got 7400 warnings, 3850 of which were of
the "‘<member>’ should be initialized in the member initialization list"
type. The vast majority of them seems to be duplicates, though.

Second most frequent warning is "class <classname> has pointer data
members but does not override ‘<classname>(const <classname>&)’ or
‘operator=(const <classname>&)’", followed by "base class ‘class
<classname>’ has a non-virtual destructor". I don't know how serious
these are or what to do about them, so for now I'll go ahead creating
initialization lists.

Best regards,
        Andreas


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to