]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a few warnings while I'm in there. Melchior poitned out that my default
authorandy <andy>
Tue, 8 Aug 2006 18:23:20 +0000 (18:23 +0000)
committerandy <andy>
Tue, 8 Aug 2006 18:23:20 +0000 (18:23 +0000)
configure-generated Makefiles don't include -Wall and a few issues had crept
into the code.

src/FDM/YASim/BodyEnvironment.hpp
src/FDM/YASim/Engine.hpp
src/FDM/YASim/FGFDM.cpp
src/FDM/YASim/Model.cpp
src/FDM/YASim/yasim-test.cpp

index 69b4a3e4ecad8ef3f0157c84e61ab72fdf7f3127..536b4ea404d373f895d82c043c6153b59c3b117f 100644 (file)
@@ -89,6 +89,8 @@ public:
     // of body state vs. the environment can happen here (crashes,
     // etc...).
     virtual void newState(State* state) = 0;
+
+    virtual ~BodyEnvironment() {} // #!$!?! gcc warning...
 };
 
 }; // namespace yasim
index 8be455507bdd30a79083ab0d6082532250e2d3a8..135deab34e94ae2d971fa16a0bbb248199552808 100644 (file)
@@ -35,6 +35,7 @@ public:
     virtual float getTorque() = 0;
     virtual float getFuelFlow() = 0;
 
+    virtual ~Engine() {}
 protected:
     float _throttle;
     bool _starter; // true=engaged, false=disengaged
index 426a35ed43a92d1e26e4547a144366be4a3bb31b..0284adf257901c3d560034a078418bca304bdad2 100644 (file)
@@ -480,7 +480,7 @@ void FGFDM::setOutputProperties(float dt)
         int j = 0;
         float f;
         char b[256];
-        while(j = r->getValueforFGSet(j, b, &f))
+        while((j = r->getValueforFGSet(j, b, &f)))
             if(b[0]) fgSetFloat(b,f);
         
         for(j=0; j < r->numRotorparts(); j++) {
index e38de251564d86b18c791d0419c0ba51880a8f09..35cf6dea7b8ab1641f7257bd2a9afd921fa48a48 100644 (file)
@@ -477,7 +477,6 @@ void Model::calcForces(State* s)
 
     // The arrester hook
     if(_hook) {
-       float v[3], rot[3], glvel[3], ground[3];
         _hook->calcForce(_ground_cb, &_body, s, lv, lrot);
        float force[3], contact[3];
         _hook->getForce(force, contact);
@@ -486,7 +485,6 @@ void Model::calcForces(State* s)
 
     // The launchbar/holdback
     if(_launchbar) {
-       float v[3], rot[3], glvel[3], ground[3];
         _launchbar->calcForce(_ground_cb, &_body, s, lv, lrot);
        float forcelb[3], contactlb[3], forcehb[3], contacthb[3];
         _launchbar->getForce(forcelb, contactlb, forcehb, contacthb);
index 4affd193b01f7fa2069004cb1960d3d79086d001..8696ff36bbd256a7b164cb215e9d366f9807aa50 100644 (file)
@@ -30,8 +30,8 @@ static const float KTS2MPS = 0.514444444444;
 // G's).  You can use this in gnuplot like so (assuming the output is
 // in a file named "dat":
 //
-// plot "dat" using 1:2 with lines title 'lift', \
-//      "dat" using 1:3 with lines title 'drag', \
+// plot "dat" using 1:2 with lines title 'lift', \ 
+//      "dat" using 1:3 with lines title 'drag', \ 
 //      "dat" using 1:4 with lines title 'LD'
 //
 void yasim_graph(Airplane* a, float alt, float kts)