From: Edward d'Auvergne Date: Thu, 10 Dec 2015 07:47:35 +0000 (+0100) Subject: UIUC and LaRCsim cleanup of -Wunused-variable compilation warnings. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e7d405d0ee9bb9f8baaf4343091fa7535432ce3c;p=flightgear.git UIUC and LaRCsim cleanup of -Wunused-variable compilation warnings. This is for defined but unused variables, many of which are in commented out code. --- diff --git a/src/FDM/LaRCsim/basic_aero.c b/src/FDM/LaRCsim/basic_aero.c index e5185318d..d035dd808 100644 --- a/src/FDM/LaRCsim/basic_aero.c +++ b/src/FDM/LaRCsim/basic_aero.c @@ -79,7 +79,7 @@ void basic_aero(SCALAR dt, int Initialize) // zero, then re-initialize coefficients by reading in the coefficient file. { static int init = 0; - static SCALAR elevator_drela, aileron_drela, rudder_drela; + //static SCALAR elevator_drela, aileron_drela, rudder_drela; SCALAR C_ref; SCALAR B_ref; @@ -152,12 +152,14 @@ void basic_aero(SCALAR dt, int Initialize) SCALAR Cl_r_mod,Cn_p_mod; SCALAR CL_drela,CD_drela,Cx_drela,Cy_drela,Cz_drela,Cl_drela,Cm_drela,Cn_drela; SCALAR QS; + /* SCALAR G_11,G_12,G_13; SCALAR G_21,G_22,G_23; SCALAR G_31,G_32,G_33; SCALAR U_body_X,U_body_Y,U_body_Z; SCALAR V_body_X,V_body_Y,V_body_Z; SCALAR W_body_X,W_body_Y,W_body_Z; + */ SCALAR P_atmo,Q_atmo,R_atmo; // set the parameters diff --git a/src/FDM/LaRCsim/basic_gear.c b/src/FDM/LaRCsim/basic_gear.c index f634b39cd..889d9df38 100644 --- a/src/FDM/LaRCsim/basic_gear.c +++ b/src/FDM/LaRCsim/basic_gear.c @@ -98,7 +98,7 @@ static void clear3( DATA v[] ) void basic_gear() { -char rcsid[] = "junk"; +//char rcsid[] = "junk"; #define NUM_WHEELS 4 // char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"}; diff --git a/src/FDM/LaRCsim/c172_gear.c b/src/FDM/LaRCsim/c172_gear.c index f6473f99a..cb04ca9c0 100644 --- a/src/FDM/LaRCsim/c172_gear.c +++ b/src/FDM/LaRCsim/c172_gear.c @@ -149,7 +149,7 @@ static void clear3( DATA v[] ) void c172_gear() { -char rcsid[] = "$Id$"; +//char rcsid[] = "$Id$"; #define NUM_WHEELS 4 // char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"}; /* diff --git a/src/FDM/LaRCsim/cherokee_aero.c b/src/FDM/LaRCsim/cherokee_aero.c index 46f738ae8..27a10f0b1 100644 --- a/src/FDM/LaRCsim/cherokee_aero.c +++ b/src/FDM/LaRCsim/cherokee_aero.c @@ -83,15 +83,15 @@ void cherokee_aero() Clp = -0.4704, Clr = 0.1665, Cyb = -1169.8/(146.69*146.69*157.5/2.0*0.00238), - Cyp = -0.0342, + // Cyp = -0.0342, (unused) Cnb = 11127.2/(146.69*146.69*157.5/2.0*0.00238)/30.0, Cnp = -0.0691, Cnr = -0.0930, - Cyf = -14.072/(146.69*146.69*157.5/2.0*0.00238), - Cyps = 89.229/(146.69*146.69*157.5/2.0*0.00238), - Clf = -5812.4/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Clda ? - Cnf = -853.93/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Cnda ? - Cnps = -1149.0/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Cndr ? + // Cyf = -14.072/(146.69*146.69*157.5/2.0*0.00238), (unused) + // Cyps = 89.229/(146.69*146.69*157.5/2.0*0.00238), (unused) + // Clf = -5812.4/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Clda ? (unused) + // Cnf = -853.93/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Cnda ? (unused) + // Cnps = -1149.0/(146.69*146.69*157.5/2.0*0.00238)/30.0, //%Cndr ? (unused) Cyr = 1.923/(146.69*146.69*157.5/2.0*0.00238), Cx0 = -0.4645/(157.5*0.3048*0.3048), @@ -100,7 +100,7 @@ void cherokee_aero() Cm0 = 0.0959, Clda = -5812.4/(146.69*146.69*157.5/2.0*0.00238)/30.0, // Clf - Cnda = -853.93/(146.69*146.69*157.5/2.0*0.00238)/30.0, // Cnf + // Cnda = -853.93/(146.69*146.69*157.5/2.0*0.00238)/30.0, // Cnf (unused) Cndr = -1149.0/(146.69*146.69*157.5/2.0*0.00238)/30.0, // Cnps /* diff --git a/src/FDM/LaRCsim/cherokee_gear.c b/src/FDM/LaRCsim/cherokee_gear.c index e3fc73c24..72e821cee 100644 --- a/src/FDM/LaRCsim/cherokee_gear.c +++ b/src/FDM/LaRCsim/cherokee_gear.c @@ -135,7 +135,7 @@ static void clear3( DATA v[] ) void cherokee_gear() { -char rcsid[] = "$Id$"; +// char rcsid[] = "$Id$"; /* * Aircraft specific initializations and data goes here diff --git a/src/FDM/LaRCsim/ls_init.c b/src/FDM/LaRCsim/ls_init.c index b249608c9..c62736ce9 100644 --- a/src/FDM/LaRCsim/ls_init.c +++ b/src/FDM/LaRCsim/ls_init.c @@ -128,7 +128,7 @@ Initial Flight Gear revision. OUTPUTS: --------------------------------------------------------------------------*/ -static char rcsid[] = "$Id$"; +// static char rcsid[] = "$Id$"; #include #include diff --git a/src/FDM/LaRCsim/ls_interface.c b/src/FDM/LaRCsim/ls_interface.c index e24b2aa82..3ac0cb2a3 100644 --- a/src/FDM/LaRCsim/ls_interface.c +++ b/src/FDM/LaRCsim/ls_interface.c @@ -280,7 +280,7 @@ static char matname[MAX_FILE_NAME_LENGTH] = "run.m"; void ls_stamp( void ) { - char rcsid[] = "$Id$"; + // char rcsid[] = "$Id$"; char revid[] = "$Revision$"; char dateid[] = "$Date$"; struct tm *nowtime; diff --git a/src/FDM/LaRCsim/ls_matrix.c b/src/FDM/LaRCsim/ls_matrix.c index b2bc9c8d1..6752db731 100644 --- a/src/FDM/LaRCsim/ls_matrix.c +++ b/src/FDM/LaRCsim/ls_matrix.c @@ -106,7 +106,7 @@ Initial revision. #define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;} -static char rcsid[] = "$Id$"; +// static char rcsid[] = "$Id$"; int *nr_ivector(long nl, long nh) diff --git a/src/FDM/LaRCsim/navion_gear.c b/src/FDM/LaRCsim/navion_gear.c index 995955c88..41382d327 100644 --- a/src/FDM/LaRCsim/navion_gear.c +++ b/src/FDM/LaRCsim/navion_gear.c @@ -159,7 +159,7 @@ static void clear3( DATA v[] ) } void navion_gear( SCALAR dt, int Initialize ) { -char rcsid[] = "$Id$"; +// char rcsid[] = "$Id$"; /* * Aircraft specific initializations and data goes here diff --git a/src/FDM/UIUCModel/uiuc_flapdata.cpp b/src/FDM/UIUCModel/uiuc_flapdata.cpp index 7c64d6971..662e27462 100644 --- a/src/FDM/UIUCModel/uiuc_flapdata.cpp +++ b/src/FDM/UIUCModel/uiuc_flapdata.cpp @@ -262,7 +262,7 @@ double FlapData::interpolate(double x0, double y0, double x1, double y1, double int FlapData::readIn (ifstream* f){ int i,j,k,l; - int count=0; + //int count=0; char numstr[200]; f->getline(numstr,200);