From: Tim Moore Date: Mon, 24 Aug 2009 15:54:48 +0000 (+0200) Subject: Initialize some variables X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bfe942268e706d6edc44c462c899e724194ee88a;p=flightgear.git Initialize some variables --- diff --git a/src/FDM/SP/MagicCarpet.cxx b/src/FDM/SP/MagicCarpet.cxx index b3b7e6b9f..99c937433 100644 --- a/src/FDM/SP/MagicCarpet.cxx +++ b/src/FDM/SP/MagicCarpet.cxx @@ -85,7 +85,7 @@ void FGMagicCarpet::update( double dt ) { _set_Euler_Rates(0,0,0); // update (lon/lat) position - double lat2, lon2, az2; + double lat2 = 0.0, lon2 = 0.0, az2 = 0.0; if ( fabs( speed ) > SG_EPSILON ) { geo_direct_wgs_84 ( get_Altitude(), get_Latitude() * SGD_RADIANS_TO_DEGREES, diff --git a/src/FDM/UFO.cxx b/src/FDM/UFO.cxx index 1ac7f9d7a..e8a37fc7b 100644 --- a/src/FDM/UFO.cxx +++ b/src/FDM/UFO.cxx @@ -154,7 +154,7 @@ void FGUFO::update( double dt ) { double yaw = fabs(rudder) < .2 ? 0.0 : rudder / (25 + fabs(speed) * .1); // update (lon/lat) position - double lat2, lon2, az2; + double lat2 = 0.0, lon2 = 0.0, az2 = 0.0; if ( fabs(speed) > SG_EPSILON ) { geo_direct_wgs_84 ( get_Altitude(), get_Latitude() * SGD_RADIANS_TO_DEGREES,