From 5956ade90c0d843250f4f01830e01c90411837ee Mon Sep 17 00:00:00 2001 From: ehofman Date: Tue, 6 Dec 2005 18:32:07 +0000 Subject: [PATCH] Mathias: silence some valgrind warnings so that you can concentrate better on the real problems. --- src/Airports/simple.cxx | 3 +++ src/Airports/simple.hxx | 2 +- src/Input/input.cxx | 12 +++++++++++- src/Traffic/Schedule.cxx | 10 ++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx index a3b4e636a..464c32fea 100644 --- a/src/Airports/simple.cxx +++ b/src/Airports/simple.cxx @@ -1281,6 +1281,9 @@ bool FGTaxiRoute::next(int *val) FGGroundNetwork::FGGroundNetwork() { hasNetwork = false; + foundRoute = false; + totalDistance = 0; + maxDistance = 0; } void FGGroundNetwork::addSegment(const FGTaxiSegment &seg) diff --git a/src/Airports/simple.hxx b/src/Airports/simple.hxx index 9e3161474..774f69118 100644 --- a/src/Airports/simple.hxx +++ b/src/Airports/simple.hxx @@ -68,7 +68,7 @@ private: double tailWind; double crssWind; public: - ScheduleTime() {}; + ScheduleTime() : tailWind(0), crssWind(0) {}; ScheduleTime(const ScheduleTime &other); ScheduleTime &operator= (const ScheduleTime &other); string getName(time_t dayStart); diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 48ea1c2b4..c42938999 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -973,6 +973,8 @@ FGInput::_find_key_bindings (unsigned int k, int modifiers) FGInput::button::button () : is_repeatable(false), + interval_sec(0), + last_dt(0), last_state(0) { } @@ -995,7 +997,9 @@ FGInput::axis::axis () : last_value(9999999), tolerance(0.002), low_threshold(-0.9), - high_threshold(0.9) + high_threshold(0.9), + interval_sec(0), + last_dt(0) { } @@ -1013,6 +1017,12 @@ FGInput::axis::~axis () //////////////////////////////////////////////////////////////////////// FGInput::joystick::joystick () + : jsnum(0), + js(0), + naxes(0), + nbuttons(0), + axes(0), + buttons(0) { } diff --git a/src/Traffic/Schedule.cxx b/src/Traffic/Schedule.cxx index 6dfe218da..1aae3e683 100644 --- a/src/Traffic/Schedule.cxx +++ b/src/Traffic/Schedule.cxx @@ -59,6 +59,13 @@ FGAISchedule::FGAISchedule() { firstRun = true; AIManagerRef = 0; + + heavy = false; + lat = 0; + lon = 0; + radius = 0; + groundOffset = 0; + distanceToUser = 0; } FGAISchedule::FGAISchedule(string mdl, @@ -80,8 +87,11 @@ FGAISchedule::FGAISchedule(string mdl, airline = arln; m_class = mclass; flightType = fltpe; + lat = 0; + lon = 0; radius = rad; groundOffset = grnd; + distanceToUser = 0; heavy = hvy; for (FGScheduledFlightVecIterator i = flt.begin(); i != flt.end(); -- 2.39.5