From 219be77f1e329b03a7dcf1d697ea2fdbf7f1a81a Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 27 Jun 2009 08:09:10 +0000 Subject: [PATCH] Suppress warnings --- src/AIModel/performancedb.cxx | 2 +- src/ATCDCL/ATCDialog.cxx | 2 +- src/Airports/sidstar.cxx | 2 +- src/Airports/xmlloader.cxx | 10 +++++----- src/Autopilot/xmlauto.cxx | 2 +- src/Environment/environment_ctrl.cxx | 4 ++-- src/FDM/UIUCModel/uiuc_menu.cpp | 3 --- src/FDM/YASim/Rotor.cpp | 1 - src/GUI/dialog.cxx | 3 ++- src/Input/input.cxx | 12 ++++++------ src/Systems/electrical.cxx | 2 +- src/Systems/system_mgr.cxx | 2 +- 12 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/AIModel/performancedb.cxx b/src/AIModel/performancedb.cxx index 10e7f6ce1..3f9aafa68 100644 --- a/src/AIModel/performancedb.cxx +++ b/src/AIModel/performancedb.cxx @@ -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; diff --git a/src/ATCDCL/ATCDialog.cxx b/src/ATCDCL/ATCDialog.cxx index 5e548667e..e356cee3f 100644 --- a/src/ATCDCL/ATCDialog.cxx +++ b/src/ATCDCL/ATCDialog.cxx @@ -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]; diff --git a/src/Airports/sidstar.cxx b/src/Airports/sidstar.cxx index 4f353a659..6566e23d8 100644 --- a/src/Airports/sidstar.cxx +++ b/src/Airports/sidstar.cxx @@ -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; diff --git a/src/Airports/xmlloader.cxx b/src/Airports/xmlloader.cxx index 7005ca52a..de35f4d13 100644 --- a/src/Airports/xmlloader.cxx +++ b/src/Airports/xmlloader.cxx @@ -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; } diff --git a/src/Autopilot/xmlauto.cxx b/src/Autopilot/xmlauto.cxx index 1da364276..e971201c4 100644 --- a/src/Autopilot/xmlauto.cxx +++ b/src/Autopilot/xmlauto.cxx @@ -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() ); } diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 68c6e31c9..c14b8b9bf 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -141,9 +141,9 @@ FGInterpolateEnvironmentCtrl::read_table (const SGPropertyNode * node, vectornChildren(); 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' diff --git a/src/FDM/UIUCModel/uiuc_menu.cpp b/src/FDM/UIUCModel/uiuc_menu.cpp index 58694c3f5..06f9dea49 100644 --- a/src/FDM/UIUCModel/uiuc_menu.cpp +++ b/src/FDM/UIUCModel/uiuc_menu.cpp @@ -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; diff --git a/src/FDM/YASim/Rotor.cpp b/src/FDM/YASim/Rotor.cpp index 5eb2c33fc..f81ea73a3 100644 --- a/src/FDM/YASim/Rotor.cpp +++ b/src/FDM/YASim/Rotor.cpp @@ -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; } diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index b5289a2e2..9c82d8813 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -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); diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 4a9b2549f..6fc8bc997 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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; diff --git a/src/Systems/electrical.cxx b/src/Systems/electrical.cxx index 2bd473c09..045d62207 100644 --- a/src/Systems/electrical.cxx +++ b/src/Systems/electrical.cxx @@ -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() ); diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 3a706d8ca..9d945a584 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -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() ); } -- 2.39.2