]> git.mxchange.org Git - flightgear.git/commitdiff
Some warning fixes, mostly unused variables
authorTorsten Dreyer <Torsten@t3r.de>
Sun, 25 Dec 2011 13:41:47 +0000 (14:41 +0100)
committerTorsten Dreyer <Torsten@t3r.de>
Sun, 25 Dec 2011 13:41:47 +0000 (14:41 +0100)
src/AIModel/AIAircraft.cxx
src/AIModel/AIBallistic.cxx
src/Cockpit/panel_io.cxx
src/Instrumentation/HUD/HUD_ladder.cxx
src/Instrumentation/HUD/HUD_runway.cxx
src/Instrumentation/HUD/HUD_tape.cxx
src/MultiPlayer/multiplaymgr.cxx

index ca72ee78c4c4d4643bb54a9707c7c899f4bfbe05..5cd3d627758ff63a95a65aa0495d1ae1ba508f90 100644 (file)
@@ -1057,7 +1057,7 @@ void FGAIAircraft::updateHeading() {
         // If on ground, calculate heading change directly
         if (onGround()) {
             double headingDiff = fabs(hdg-tgt_heading);
-            double bank_sense = 0.0;
+//            double bank_sense = 0.0;
         /*
         double diff = fabs(hdg - tgt_heading);
         if (diff > 180)
@@ -1077,9 +1077,9 @@ void FGAIAircraft::updateHeading() {
             if (sum > 360.0) 
                 sum -= 360.0;
             if (fabs(sum - tgt_heading) > 0.0001) {
-                bank_sense = -1.0;
+//                bank_sense = -1.0;
             } else {
-                bank_sense = 1.0;
+//                bank_sense = 1.0;
             }
             //if (trafficRef)
             // cerr << trafficRef->getCallSign() << " Heading " 
index 1df938c0b2817f2aa85d8cd1d84a4058fa42200a..68d72f92baf281ad6dd1caf1294cde7220e81cb0 100644 (file)
@@ -639,21 +639,21 @@ void FGAIBallistic::slaveToAC(double dt){
     if (invisible)
         return;
 
-    double hdg, pch, rll, agl = 0;
+    double hdg, pch, rll;//, agl = 0;
 
     if (_pnode != 0) {
         setParentPos();
         hdg = _p_hdg_node->getDoubleValue();
         pch = _p_pch_node->getDoubleValue();
         rll = _p_rll_node->getDoubleValue();
-        agl = _p_agl_node->getDoubleValue();
+//        agl = _p_agl_node->getDoubleValue();
         setOffsetPos(_parentpos, hdg, pch, rll);
         setSpeed(_p_spd_node->getDoubleValue());
     }else {
         hdg = manager->get_user_heading();
         pch = manager->get_user_pitch();
         rll = manager->get_user_roll();
-        agl = manager->get_user_agl();
+//        agl = manager->get_user_agl();
         setOffsetPos(userpos, hdg, pch, rll);
         setSpeed(manager->get_user_speed());
     }
index 754afb30e33278c99d9c0b455b3a6cdd383d91cf..c0dcfd5dc671f2aa4a987f1e0e306f843bd26ab7 100644 (file)
@@ -755,8 +755,8 @@ readPanel (const SGPropertyNode * root)
           int y = node->getIntValue("y", -1);
           int real_w = node->getIntValue("w", -1);
           int real_h = node->getIntValue("h", -1);
-          int w = node->getIntValue("w-base", -1);
-          int h = node->getIntValue("h-base", -1);
+//          int w = node->getIntValue("w-base", -1);
+//          int h = node->getIntValue("h-base", -1);
           
           if (x == -1 || y == -1) {
             SG_LOG( SG_COCKPIT, SG_ALERT,
@@ -764,15 +764,15 @@ readPanel (const SGPropertyNode * root)
             return 0;
           }
           
-          float w_scale = 1.0;
-          float h_scale = 1.0;
+//          float w_scale = 1.0;
+//          float h_scale = 1.0;
           if (real_w != -1) {
-            w_scale = float(real_w) / float(w);
-            w = real_w;
+//            w_scale = float(real_w) / float(w);
+//            w = real_w;
           }
           if (real_h != -1) {
-            h_scale = float(real_h) / float(h);
-            h = real_h;
+//            h_scale = float(real_h) / float(h);
+//            h = real_h;
           }
           
           SG_LOG( SG_COCKPIT, SG_BULK, "Reading instrument " << name );
index 88bd175491d0898e9654bd0f005ecf1d253e187b..9b4ba108461dbec5cd959cce462020e94b0fffbb 100644 (file)
@@ -138,7 +138,7 @@ void HUD::Ladder::draw(void)
     //****************************************************************
     //velocity vector reticle - computations
     float xvvr, /* yvvr, */ Vxx = 0.0, Vyy = 0.0, Vzz = 0.0;
-    float Axx = 0.0, Ayy = 0.0, Azz = 0.0, total_vel = 0.0, pot_slope, t1;
+    float Axx = 0.0, Ayy = 0.0, Azz = 0.0, total_vel = 0.0, pot_slope; //, t1;
     float up_vel, ground_vel, actslope = 0.0, psi = 0.0;
     float vel_x = 0.0, vel_y = 0.0, drift;
     float alpha;
@@ -320,10 +320,10 @@ void HUD::Ladder::draw(void)
 
     if (_energy_marker) {
         if (total_vel < 5.0) {
-            t1 = 0;
+//            t1 = 0;
             t2 = 0;
         } else {
-            t1 = up_vel / total_vel;
+//            t1 = up_vel / total_vel;
             t2 = asin((Vxx * Axx + Vyy * Ayy + Vzz * Azz) / (9.81 * total_vel));
         }
         pot_slope = ((t2 / 3) * SGD_RADIANS_TO_DEGREES) * _compression + vel_y;
index ae2f1243785717ad6d5ddb89a5e7ba059e462007..b115b3ae741c4756697bbdaeaf6da2f013d62cc1 100644 (file)
@@ -123,9 +123,9 @@ void HUD::Runway::draw()
     }
 
     //Calculate the 2D points via gluProject
-    int result = GL_TRUE;
+//    int result = GL_TRUE;
     for (int i = 0; i < 6; i++) {
-        result = simgear::project(_points3d[i][0], _points3d[i][1], _points3d[i][2],
+        /*result = */simgear::project(_points3d[i][0], _points3d[i][1], _points3d[i][2],
                                   _mm, _pm, _view,
                                   &_points2d[i][0], &_points2d[i][1], &_points2d[i][2]);
     }
index 6820e8880f479a67032413e4319915e9c34167d8..4897a7e4a29cd8b79d2f642fdd39fe7934006b62 100644 (file)
@@ -89,7 +89,7 @@ void HUD::Tape::draw(void) //  (HUD_scale * pscale)
 
 void HUD::Tape::draw_vertical(float value)
 {
-    float vmin = 0.0, vmax = 0.0;
+    float vmin = 0.0;//, vmax = 0.0;
     float marker_xs;
     float marker_xe;
     float marker_ye;
@@ -101,16 +101,16 @@ void HUD::Tape::draw_vertical(float value)
 
     if (!_pointer) {
         vmin = value - _half_width_units; // width units == needle travel
-        vmax = value + _half_width_units; // or picture unit span.
+//        vmax = value + _half_width_units; // or picture unit span.
         text_y = _center_y;
 
     } else if (_pointer_type == MOVING) {
         vmin = _input.min();
-        vmax = _input.max();
+//        vmax = _input.max();
 
     } else { // FIXED
         vmin = value - _half_width_units; // width units == needle travel
-        vmax = value + _half_width_units; // or picture unit span.
+//        vmax = value + _half_width_units; // or picture unit span.
         text_y = _center_y;
     }
 
@@ -348,12 +348,12 @@ void HUD::Tape::draw_vertical(float value)
 
 void HUD::Tape::draw_horizontal(float value)
 {
-    float vmin = 0.0, vmax = 0.0;
+    float vmin = 0.0;//, vmax = 0.0;
     float marker_xs;
-    float marker_xe;
+//    float marker_xe;
     float marker_ys;
     float marker_ye;
-    float text_y = 0.0;
+//    float text_y = 0.0;
 
     float top = _y + _h;
     float right = _x + _w;
@@ -361,17 +361,17 @@ void HUD::Tape::draw_horizontal(float value)
 
     if (!_pointer) {
         vmin = value - _half_width_units; // width units == needle travel
-        vmax = value + _half_width_units; // or picture unit span.
-        text_y = _center_y;
+//        vmax = value + _half_width_units; // or picture unit span.
+//        text_y = _center_y;
 
     } else if (_pointer_type == MOVING) {
         vmin = _input.min();
-        vmax = _input.max();
+//        vmax = _input.max();
 
     } else { // FIXED
         vmin = value - _half_width_units; // width units == needle travel
-        vmax = value + _half_width_units; // or picture unit span.
-        text_y = _center_y;
+//        vmax = value + _half_width_units; // or picture unit span.
+//        text_y = _center_y;
     }
 
     // left tick bar
@@ -384,7 +384,7 @@ void HUD::Tape::draw_horizontal(float value)
 
     marker_ys = _y;    // Starting point for
     marker_ye = top;           // tick y location calcs
-    marker_xe = right;
+//    marker_xe = right;
     marker_xs = _x + ((value - vmin) * factor());
 
     if (option_top()) {
index 123317c63536b25d5d9893f8fd13a41a7e09055c..d7a839706199ec0fcf27e7643a0df273d0b19037 100644 (file)
@@ -965,10 +965,10 @@ FGMultiplayMgr::Send()
     }
 
     double sim_time = globals->get_sim_time_sec();
-    static double lastTime = 0.0;
+//    static double lastTime = 0.0;
     
    // SG_LOG(SG_GENERAL, SG_INFO, "actual dt=" << sim_time - lastTime);
-    lastTime = sim_time;
+//    lastTime = sim_time;
     
     FlightProperties ifce;