]> git.mxchange.org Git - flightgear.git/commitdiff
Initialize some variables
authorTim Moore <timoore@redhat.com>
Mon, 24 Aug 2009 15:54:48 +0000 (17:54 +0200)
committerTim Moore <timoore@redhat.com>
Mon, 24 Aug 2009 15:54:48 +0000 (17:54 +0200)
src/FDM/SP/MagicCarpet.cxx
src/FDM/UFO.cxx

index b3b7e6b9f2ce00869c782156a9d708f8ecad3995..99c937433daa222ee211e92b035045fbaf3fc157 100644 (file)
@@ -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,
index 1ac7f9d7a055bc3a72808bb635fb77db621d6253..e8a37fc7b727ebec08d5ceeee34c1512b6c741e2 100644 (file)
@@ -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,