]> git.mxchange.org Git - flightgear.git/commitdiff
Fix warnings identified by gcc.
authorThomas Geymayer <tomgey@gmail.com>
Thu, 4 Jul 2013 21:07:10 +0000 (23:07 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 4 Jul 2013 21:07:36 +0000 (23:07 +0200)
src/FDM/YASim/YASim.cxx
src/Viewer/fg_os_osgviewer.cxx

index fdd8dbf1091e0066b10b0cfa1f390ece51dda547..03f55217be0ca35c73e763862f868738891a8b09 100644 (file)
@@ -258,7 +258,11 @@ void YASim::update(double dt)
     // ground.  Calculate a cartesian coordinate for the ground under
     // us, find the (geodetic) up vector normal to the ground, then
     // use that to find the final (radius) term of the plane equation.
-    float v[3] = { get_uBody(), get_vBody(), get_wBody() };
+    float v[3] = {
+      static_cast<float>(get_uBody()),
+      static_cast<float>(get_vBody()),
+      static_cast<float>(get_wBody())
+    };
     float lat = get_Latitude(); float lon = get_Longitude();
     float alt = get_Altitude() * FT2M; double xyz[3];
     sgGeodToCart(lat, lon, alt, xyz);
index 22526d0db9bb58890231ebb081c043689194e4c6..edd2e6ce22621d239463db1f067201fc04bb7a92 100644 (file)
@@ -203,6 +203,7 @@ private:
       case osg::INFO:   return SG_INFO;
       case osg::DEBUG_FP:
       case osg::DEBUG_INFO: return SG_DEBUG;
+      default: return SG_ALERT;
     }
   }
 };