1
0
Fork 0

Suppress warnings

This commit is contained in:
fredb 2009-06-27 08:09:10 +00:00 committed by Tim Moore
parent 0783a96d4d
commit 219be77f1e
12 changed files with 21 additions and 24 deletions

View file

@ -60,7 +60,7 @@ void PerformanceDB::load(SGPath filename) {
SGPropertyNode root; SGPropertyNode root;
try { try {
readProperties(filename.str(), &root); readProperties(filename.str(), &root);
} catch (const sg_exception &e) { } catch (const sg_exception &) {
SG_LOG(SG_GENERAL, SG_ALERT, SG_LOG(SG_GENERAL, SG_ALERT,
"Error reading AI aircraft performance database: " << filename.str()); "Error reading AI aircraft performance database: " << filename.str());
return; return;

View file

@ -266,7 +266,7 @@ void FGATCDialog::PopupCallback(int num) {
//cout << "TOWER " << endl; //cout << "TOWER " << endl;
//cout << "ident is " << atcptr->get_ident() << endl; //cout << "ident is " << atcptr->get_ident() << endl;
atcmentry_vec_type atcmlist = (available_dialog[TOWER])[atcptr->get_ident()]; atcmentry_vec_type atcmlist = (available_dialog[TOWER])[atcptr->get_ident()];
unsigned int size = atcmlist.size(); int size = atcmlist.size();
if(size && num < size) { if(size && num < size) {
//cout << "Doing callback...\n"; //cout << "Doing callback...\n";
ATCMenuEntry a = atcmlist[num]; ATCMenuEntry a = atcmlist[num];

View file

@ -55,7 +55,7 @@ void FGSidStar::load(SGPath filename) {
string name; string name;
try { try {
readProperties(filename.str(), &root); readProperties(filename.str(), &root);
} catch (const sg_exception &e) { } catch (const sg_exception &) {
SG_LOG(SG_GENERAL, SG_ALERT, SG_LOG(SG_GENERAL, SG_ALERT,
"Error reading AI flight plan: " << filename.str()); "Error reading AI flight plan: " << filename.str());
// cout << path.str() << endl; // cout << path.str() << endl;

View file

@ -54,7 +54,7 @@ void XMLLoader::load(FGAirportDynamics* d) {
readXML(parkpath.str(), visitor); readXML(parkpath.str(), visitor);
d->init(); d->init();
} }
catch (const sg_exception &e) { catch (const sg_exception &) {
} }
} }
} else { } else {
@ -74,7 +74,7 @@ void XMLLoader::load(FGAirportDynamics* d) {
readXML(parkpath.str(), visitor); readXML(parkpath.str(), visitor);
d->init(); d->init();
} }
catch (const sg_exception &e) { catch (const sg_exception &) {
} }
return; return;
} }
@ -93,7 +93,7 @@ void XMLLoader::load(FGRunwayPreference* p) {
try { try {
readXML(rwyPrefPath.str(), visitor); readXML(rwyPrefPath.str(), visitor);
} }
catch (const sg_exception &e) { catch (const sg_exception &) {
} }
} }
} else { } else {
@ -110,7 +110,7 @@ void XMLLoader::load(FGRunwayPreference* p) {
try { try {
readXML(rwypath.str(), visitor); readXML(rwypath.str(), visitor);
} }
catch (const sg_exception &e) { catch (const sg_exception &) {
} }
return; return;
} }
@ -136,7 +136,7 @@ void XMLLoader::load(FGSidStar* p) {
//cerr << "Reading SID procedure : " << sidpath.str() << endl; //cerr << "Reading SID procedure : " << sidpath.str() << endl;
p->load(sidpath); p->load(sidpath);
} }
catch (const sg_exception &e) { catch (const sg_exception &) {
} }
return; return;
} }

View file

@ -794,7 +794,7 @@ void FGXMLAutopilot::init() {
" details."); " details.");
exit(-1); exit(-1);
} }
} catch (const sg_exception& exc) { } catch (const sg_exception&) {
SG_LOG( SG_ALL, SG_ALERT, "Failed to load autopilot configuration: " SG_LOG( SG_ALL, SG_ALERT, "Failed to load autopilot configuration: "
<< config.str() ); << config.str() );
} }

View file

@ -141,9 +141,9 @@ FGInterpolateEnvironmentCtrl::read_table (const SGPropertyNode * node, vector<bu
{ {
double last_altitude_ft = 0.0; double last_altitude_ft = 0.0;
double sort_required = false; 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); const SGPropertyNode * child = node->getChild(i);
if ( strcmp(child->getName(), "entry") == 0 if ( strcmp(child->getName(), "entry") == 0
&& child->getStringValue("elevation-ft", "")[0] != '\0' && child->getStringValue("elevation-ft", "")[0] != '\0'

View file

@ -178,9 +178,6 @@ void uiuc_menu( string aircraft_name )
{ {
string aircraft_directory; string aircraft_directory;
stack command_list; stack command_list;
double token_value;
int token_value_recordRate;
int token_value_convert1, token_value_convert2, token_value_convert3;
string linetoken1; string linetoken1;
string linetoken2; string linetoken2;

View file

@ -794,7 +794,6 @@ void Rotor::setCyclicail(float lval,float rval)
void Rotor::setRotorBalance(float lval) void Rotor::setRotorBalance(float lval)
{ {
lval = Math::clamp(lval, -1, 1); lval = Math::clamp(lval, -1, 1);
int i;
_balance2 = lval; _balance2 = lval;
} }

View file

@ -1053,8 +1053,9 @@ FGDialog::getKeyCode(const char *str)
key = toupper(key); key = toupper(key);
if (mod & CTRL) if (mod & CTRL)
key = toupper(key) - '@'; key = toupper(key) - '@';
if (mod & ALT) /* if (mod & ALT)
; // Alt not propagated to the gui ; // Alt not propagated to the gui
*/
} else { } else {
for (char *t = s; *t; t++) for (char *t = s; *t; t++)
*t = tolower(*t); *t = tolower(*t);

View file

@ -256,12 +256,12 @@ FGInput::doKey (int k, int modifiers, int x, int y)
_key_code = k; _key_code = k;
_key_modifiers = modifiers >> 1; _key_modifiers = modifiers >> 1;
_key_pressed = (modifiers & KEYMOD_RELEASED) == 0; _key_pressed = (modifiers & KEYMOD_RELEASED) == 0;
_key_shift = (modifiers & KEYMOD_SHIFT) != 0; _key_shift = getModShift();
_key_ctrl = (modifiers & KEYMOD_CTRL) != 0; _key_ctrl = getModCtrl();
_key_alt = (modifiers & KEYMOD_ALT) != 0; _key_alt = getModAlt();
_key_meta = (modifiers & KEYMOD_META) != 0; _key_meta = getModMeta();
_key_super = (modifiers & KEYMOD_SUPER) != 0; _key_super = getModSuper();
_key_hyper = (modifiers & KEYMOD_HYPER) != 0; _key_hyper = getModHyper();
_key_event->fireValueChanged(); _key_event->fireValueChanged();
if (_key_code < 0) if (_key_code < 0)
return; return;

View file

@ -392,7 +392,7 @@ void FGElectricalSystem::init () {
"details."); "details.");
exit(-1); exit(-1);
} }
} catch (const sg_exception& exc) { } catch (const sg_exception&) {
SG_LOG( SG_ALL, SG_ALERT, SG_LOG( SG_ALL, SG_ALERT,
"Failed to load electrical system model: " "Failed to load electrical system model: "
<< config.str() ); << config.str() );

View file

@ -53,7 +53,7 @@ FGSystemMgr::FGSystemMgr ()
" details."); " details.");
exit(-1); exit(-1);
} }
} catch (const sg_exception& exc) { } catch (const sg_exception&) {
SG_LOG( SG_ALL, SG_ALERT, "Failed to load systems system model: " SG_LOG( SG_ALL, SG_ALERT, "Failed to load systems system model: "
<< config.str() ); << config.str() );
} }