Core/Misc: Fix some static analysis issues

Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
This commit is contained in:
jackpoz
2013-12-14 18:41:26 +01:00
parent dd546f073a
commit 1c0903e286
40 changed files with 203 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ template<class T>
class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
{
public:
explicit ConfusedMovementGenerator() : i_nextMoveTime(0) { }
explicit ConfusedMovementGenerator() : i_nextMoveTime(0), i_x(0), i_y(0), i_z(0) { }
void DoInitialize(T*);
void DoFinalize(T*);

View File

@@ -37,7 +37,6 @@ class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovemen
private:
TimeTrackerSmall i_nextMoveTime;
uint32 i_nextMove;
float wander_distance;
};
#endif

View File

@@ -117,6 +117,10 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
{
i_path = &pathnodes;
i_currentNode = startNode;
_endGridX = 0.0f;
_endGridY = 0.0f;
_endMapId = 0;
_preloadTargetNode = 0;
}
void DoInitialize(Player*);
void DoReset(Player*);