From 8958b4d130a9b333ba2ef87836fd6573a8145f45 Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Wed, 5 Apr 2017 02:01:50 +0100 Subject: [PATCH] Cleanup unused variable warning. Remove, comment out or relocate variables as appropriate to silence unused variable warning. --- src/FDM/SP/AISim.cpp | 2 +- src/Main/options.cxx | 2 ++ src/Main/positioninit.cxx | 6 ++++-- src/MultiPlayer/multiplaymgr.cxx | 3 +-- src/Scripting/NasalPositioned.cxx | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/FDM/SP/AISim.cpp b/src/FDM/SP/AISim.cpp index 0d762d193..69a8c4598 100644 --- a/src/FDM/SP/AISim.cpp +++ b/src/FDM/SP/AISim.cpp @@ -307,7 +307,7 @@ printf("FT: %10.2f, %7.2f, MT: %7.2f\n", FT[i][X]*th, FTM[i][X]*mach, MT[i][X] simd4_t mu_body(-0.02f-0.7f*br, 0.8f, 0.0f); simd4_t FLGear = mNed2Body*Fn_lg + vUVWaero*mu_body; - simd4_t MLGear = simd4::cross(gear_pos[i], FLGear); +// simd4_t MLGear = simd4::cross(gear_pos[i], FLGear); #if 0 printf("FLGear[%i]: %10.2f %10.2f %10.2f\n",i,FLGear[0], FLGear[1], FLGear[2]); printf("MLGear[%i]: %10.2f %10.2f %10.2f\n",i,MLGear[0], MLGear[1], MLGear[2]); diff --git a/src/Main/options.cxx b/src/Main/options.cxx index c0be70768..1a4febe75 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -2817,6 +2817,8 @@ void Options::setupRoot(int argc, char **argv) SetupRootDialog::runDialog(usingDefaultRoot); } #else + SG_UNUSED(usingDefaultRoot); + // validate it if (base_version.empty()) { flightgear::fatalMessageBox("Base package not found", diff --git a/src/Main/positioninit.cxx b/src/Main/positioninit.cxx index 8e552a4a5..056ba1f2f 100644 --- a/src/Main/positioninit.cxx +++ b/src/Main/positioninit.cxx @@ -447,14 +447,16 @@ static bool fgSetPosFromNAV( const string& id, } // Set current_options lon/lat given an aircraft carrier id -static bool fgSetPosFromCarrier( const string& carrier, const string& posid ) { +static bool fgSetPosFromCarrier( const string& carrier, const string& posid ) +{ +#ifndef FG_TESTLIB + // set initial position from runway and heading SGGeod geodPos; double heading; SGVec3d uvw; -#ifndef FG_TESTLIB if (FGAIManager::getStartPosition(carrier, posid, geodPos, heading, uvw)) { double lon = geodPos.getLongitudeDeg(); double lat = geodPos.getLatitudeDeg(); diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index 8f855a68d..fbcabfc7b 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -1677,8 +1677,7 @@ FGMultiplayMgr::ProcessPosMsg(const FGMultiplayMgr::MsgBuf& Msg, // strict about the validity of the property values. const xdr_data_t* xdr = Msg.properties(); const xdr_data_t* data = xdr; - int MsgLenBytes = Msg.Header.MsgLen; - + /* * with V2 we use the pad to forcefully invoke older clients to verify (and discard) * our new protocol. diff --git a/src/Scripting/NasalPositioned.cxx b/src/Scripting/NasalPositioned.cxx index 7e6f7e491..82a209280 100644 --- a/src/Scripting/NasalPositioned.cxx +++ b/src/Scripting/NasalPositioned.cxx @@ -993,9 +993,10 @@ static naRef f_geodinfo(naContext c, naRef me, int argc, naRef* args) naRef vec = naNewVector(c); naVec_append(vec, naNum(elev)); - naRef matdata = naNil(); #ifndef FG_TESTLIB + naRef matdata = naNil(); + const SGMaterial *mat = dynamic_cast(material); if(mat) { matdata = naNewHash(c);