]> git.mxchange.org Git - flightgear.git/commitdiff
Suppress warnings
authorfredb <fredb>
Sat, 27 Jun 2009 08:09:10 +0000 (08:09 +0000)
committerTim Moore <timoore@redhat.com>
Thu, 2 Jul 2009 06:59:16 +0000 (08:59 +0200)
12 files changed:
src/AIModel/performancedb.cxx
src/ATCDCL/ATCDialog.cxx
src/Airports/sidstar.cxx
src/Airports/xmlloader.cxx
src/Autopilot/xmlauto.cxx
src/Environment/environment_ctrl.cxx
src/FDM/UIUCModel/uiuc_menu.cpp
src/FDM/YASim/Rotor.cpp
src/GUI/dialog.cxx
src/Input/input.cxx
src/Systems/electrical.cxx
src/Systems/system_mgr.cxx

index 10e7f6ce1189f94ca21e78f2db65b5fa1415f4c2..3f9aafa6893f704d496f68d89a9308ef263be529 100644 (file)
@@ -60,7 +60,7 @@ void PerformanceDB::load(SGPath filename) {
     SGPropertyNode root;
     try {
         readProperties(filename.str(), &root);
-    } catch (const sg_exception &e) {
+    } catch (const sg_exception &) {
         SG_LOG(SG_GENERAL, SG_ALERT,
             "Error reading AI aircraft performance database: " << filename.str());
         return;
index 5e548667ea999a88ef6aea4febbbfd8d5207a6e9..e356cee3f47aa10002c81747c563e582e10b4ee4 100644 (file)
@@ -266,7 +266,7 @@ void FGATCDialog::PopupCallback(int num) {
                //cout << "TOWER " << endl;
                //cout << "ident is " << atcptr->get_ident() << endl;
                atcmentry_vec_type atcmlist = (available_dialog[TOWER])[atcptr->get_ident()];
-               unsigned int size = atcmlist.size();
+               int size = atcmlist.size();
                if(size && num < size) {
                        //cout << "Doing callback...\n";
                        ATCMenuEntry a = atcmlist[num];
index 4f353a6596ea7d460e03122fce08e4955b20dc7a..6566e23d851fdc491328f7c8003e27bf44e50463 100644 (file)
@@ -55,7 +55,7 @@ void FGSidStar::load(SGPath filename) {
   string name;
   try {
       readProperties(filename.str(), &root);
-  } catch (const sg_exception &e) {
+  } catch (const sg_exception &) {
       SG_LOG(SG_GENERAL, SG_ALERT,
        "Error reading AI flight plan: " << filename.str());
        // cout << path.str() << endl;
index 7005ca52a72a6fa28b157bf0626d6652659d73d2..de35f4d1338215d11db273257f828e633f0d641b 100644 (file)
@@ -54,7 +54,7 @@ void XMLLoader::load(FGAirportDynamics* d) {
                readXML(parkpath.str(), visitor);
                d->init();
            } 
-           catch (const sg_exception &e) {
+           catch (const sg_exception &) {
            }
        }
     } else {
@@ -74,7 +74,7 @@ void XMLLoader::load(FGAirportDynamics* d) {
                     readXML(parkpath.str(), visitor);
                     d->init();
                 } 
-                catch (const sg_exception &e) {
+                catch (const sg_exception &) {
                 }
                 return;
             }
@@ -93,7 +93,7 @@ void XMLLoader::load(FGRunwayPreference* p) {
             try {
                 readXML(rwyPrefPath.str(), visitor);
             } 
-            catch (const sg_exception &e) {
+            catch (const sg_exception &) {
             }
          }
       }  else {
@@ -110,7 +110,7 @@ void XMLLoader::load(FGRunwayPreference* p) {
                try {
                    readXML(rwypath.str(), visitor);
                 } 
-                catch (const sg_exception &e) {
+                catch (const sg_exception &) {
                 }
                 return;
             }
@@ -136,7 +136,7 @@ void XMLLoader::load(FGSidStar* p) {
                    //cerr << "Reading SID procedure : " << sidpath.str() << endl;
                    p->load(sidpath);
                 } 
-                catch (const sg_exception &e) {
+                catch (const sg_exception &) {
                 }
                 return;
             }
index 1da3642765a9f61ccfa03122e9f784303fad48f6..e971201c4a68b2b5e8ac1759903c2c3e6a119f91 100644 (file)
@@ -794,7 +794,7 @@ void FGXMLAutopilot::init() {
                         " details.");
                 exit(-1);
             }        
-        } catch (const sg_exception& exc) {
+        } catch (const sg_exception&) {
             SG_LOG( SG_ALL, SG_ALERT, "Failed to load autopilot configuration: "
                     << config.str() );
         }
index 68c6e31c9572d8b96f542e6497ae00c2ec681dc6..c14b8b9bf7df226554324d9204038172689d293b 100644 (file)
@@ -141,9 +141,9 @@ FGInterpolateEnvironmentCtrl::read_table (const SGPropertyNode * node, vector<bu
 {
        double last_altitude_ft = 0.0;
        double sort_required = false;
-       int i;
+       size_t i;
 
-       for (i = 0; i < node->nChildren(); i++) {
+       for (i = 0; i < (size_t)node->nChildren(); i++) {
                const SGPropertyNode * child = node->getChild(i);
                if ( strcmp(child->getName(), "entry") == 0
                 && child->getStringValue("elevation-ft", "")[0] != '\0'
index 58694c3f5b8351fe62b84262e8664a2014dd5d7a..06f9dea493fd9314f0d9d20c1cb57d08460d64d3 100644 (file)
@@ -178,9 +178,6 @@ void uiuc_menu( string aircraft_name )
 {
   string aircraft_directory;
   stack command_list;
-  double token_value;
-  int token_value_recordRate;
-  int token_value_convert1, token_value_convert2, token_value_convert3;
   
   string linetoken1;
   string linetoken2;
index 5eb2c33fcc62d08808cd38f30172a44aa2ba2f07..f81ea73a3be4f0dc6687979da078f429985e843a 100644 (file)
@@ -794,7 +794,6 @@ void Rotor::setCyclicail(float lval,float rval)
 void Rotor::setRotorBalance(float lval)
 {
     lval = Math::clamp(lval, -1, 1);
-    int i;
     _balance2 = lval;
 }
 
index b5289a2e2a3691a1f3c6167da929cd62c7a624ae..9c82d8813668dad04774798505954b2da011bee4 100644 (file)
@@ -1053,8 +1053,9 @@ FGDialog::getKeyCode(const char *str)
             key = toupper(key);
         if (mod & CTRL)
             key = toupper(key) - '@';
-        if (mod & ALT)
+        /* if (mod & ALT)
             ;   // Alt not propagated to the gui
+        */
     } else {
         for (char *t = s; *t; t++)
             *t = tolower(*t);
index 4a9b2549f7ca7dbb86027f5f04a16761039545cd..6fc8bc9973bde718d876360c90594c131857f7a2 100644 (file)
@@ -256,12 +256,12 @@ FGInput::doKey (int k, int modifiers, int x, int y)
   _key_code = k;
   _key_modifiers = modifiers >> 1;
   _key_pressed = (modifiers & KEYMOD_RELEASED) == 0;
-  _key_shift = (modifiers & KEYMOD_SHIFT) != 0;
-  _key_ctrl = (modifiers & KEYMOD_CTRL) != 0;
-  _key_alt = (modifiers & KEYMOD_ALT) != 0;
-  _key_meta = (modifiers & KEYMOD_META) != 0;
-  _key_super = (modifiers & KEYMOD_SUPER) != 0;
-  _key_hyper = (modifiers & KEYMOD_HYPER) != 0;
+  _key_shift = getModShift();
+  _key_ctrl = getModCtrl();
+  _key_alt = getModAlt();
+  _key_meta = getModMeta();
+  _key_super = getModSuper();
+  _key_hyper = getModHyper();
   _key_event->fireValueChanged();
   if (_key_code < 0)
     return;
index 2bd473c09456e0959e3c5f5148a64f664cbcfb76..045d6220743b8858641d6fe75d6dce486b381f83 100644 (file)
@@ -392,7 +392,7 @@ void FGElectricalSystem::init () {
                         "details.");
                 exit(-1);
             }        
-        } catch (const sg_exception& exc) {
+        } catch (const sg_exception&) {
             SG_LOG( SG_ALL, SG_ALERT,
                     "Failed to load electrical system model: "
                     << config.str() );
index 3a706d8ca9cb2724415b2efddc34472c07775940..9d945a5849f3adeaed68acea0f3cfedcc25dbc86 100644 (file)
@@ -53,7 +53,7 @@ FGSystemMgr::FGSystemMgr ()
                         " details.");
                 exit(-1);
             }        
-        } catch (const sg_exception& exc) {
+        } catch (const sg_exception&) {
             SG_LOG( SG_ALL, SG_ALERT, "Failed to load systems system model: "
                     << config.str() );
         }