From cd89ce7d0a0d8eb1c700ac305f10d583f250daec Mon Sep 17 00:00:00 2001 From: torsten Date: Fri, 21 Aug 2009 21:46:58 +0000 Subject: [PATCH] warning fixes --- src/Network/ATC-Outputs.cxx | 2 ++ src/Network/AV400.cxx | 2 ++ src/Network/httpd.cxx | 2 +- src/Network/opengc.cxx | 31 +++++++++++++++---------------- src/Network/opengc.hxx | 1 - 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Network/ATC-Outputs.cxx b/src/Network/ATC-Outputs.cxx index c9099cb9c..480ad7143 100644 --- a/src/Network/ATC-Outputs.cxx +++ b/src/Network/ATC-Outputs.cxx @@ -173,6 +173,7 @@ static int ATCSetStepper( int fd, unsigned char channel, } +#ifdef ATCFLIGHTSIM_HAVE_COMPASS // Read status of last stepper written to static unsigned char ATCReadStepper( int fd ) { #if defined( unix ) || defined( __CYGWIN__ ) @@ -195,6 +196,7 @@ static unsigned char ATCReadStepper( int fd ) { return 0; #endif } +#endif // Turn a lamp on or off diff --git a/src/Network/AV400.cxx b/src/Network/AV400.cxx index 1b59d9e4c..eead2455b 100644 --- a/src/Network/AV400.cxx +++ b/src/Network/AV400.cxx @@ -43,6 +43,7 @@ FGAV400::~FGAV400() { } +#if 0 // calculate the garmin check sum static char calc_nmea_cksum(char *sentence) { unsigned char sum = 0; @@ -61,6 +62,7 @@ static char calc_nmea_cksum(char *sentence) { // printf("sum = %02x\n", sum); return sum; } +#endif // generate AV400 message diff --git a/src/Network/httpd.cxx b/src/Network/httpd.cxx index 7332284b8..7adc4214d 100644 --- a/src/Network/httpd.cxx +++ b/src/Network/httpd.cxx @@ -267,7 +267,7 @@ void HttpdChannel::foundTerminator (void) { SG_LOG( SG_IO, SG_INFO, "size = " << response.length() ); char ctmp[256]; - sprintf(ctmp, "Content-Length: %d", response.length()); + sprintf(ctmp, "Content-Length: %u", (unsigned)response.length()); push( ctmp ); push( getTerminator() ); diff --git a/src/Network/opengc.cxx b/src/Network/opengc.cxx index 2babd221c..6cdb5a4f5 100644 --- a/src/Network/opengc.cxx +++ b/src/Network/opengc.cxx @@ -50,6 +50,18 @@ FGOpenGC::FGOpenGC() : wind_dir_node(fgGetNode("/environment/wind-from-heading-deg[0]", true)), wind_speed_node(fgGetNode("/environment/wind-speed-kt[0]", true)), magvar_node(fgGetNode("/environment/magnetic-variation-deg[0]", true)), + p_latitude(fgGetNode("/position/latitude-deg", true)), + p_longitude(fgGetNode("/position/longitude-deg", true)), + p_elev_node(fgGetNode("/position/altitude-ft", true)), + p_altitude_agl(fgGetNode("/position/altitude-agl-ft", true)), + p_pitch(fgGetNode("/orientation/pitch-deg[0]", true)), + p_bank(fgGetNode("/orientation/roll-deg[0]", true)), + p_heading(fgGetNode("/orientation/heading-magnetic-deg[0]", true)), + p_yaw(fgGetNode("/fdm/jsbsim/aero/beta-rad[0]", true)), + p_yaw_rate(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)), + vel_kcas(fgGetNode("/velocities/airspeed-kt[0]", true)), + p_vvi(fgGetNode("/velocities/vertical-speed-fps[0]", true )), + p_mach(fgGetNode("/velocities/mach[0]", true )), p_left_aileron(fgGetNode("surface-positions/left-aileron-pos-norm", true)), p_right_aileron(fgGetNode("surface-positions/right-aileron-pos-norm", true)), p_elevator(fgGetNode("surface-positions/elevator-pos-norm", true)), @@ -57,15 +69,7 @@ FGOpenGC::FGOpenGC() : p_rudder(fgGetNode("surface-positions/rudder-pos-norm", true)), p_flaps(fgGetNode("surface-positions/flap-pos-norm", true)), p_flaps_cmd(fgGetNode("/controls/flight/flaps", true)), - p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-rad_sec[0]", true)), - p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)), - p_latitude(fgGetNode("/position/latitude-deg", true)), - p_longitude(fgGetNode("/position/longitude-deg", true)), - p_elev_node(fgGetNode("/position/altitude-ft", true)), - p_altitude_agl(fgGetNode("/position/altitude-agl-ft", true)), - vel_kcas(fgGetNode("/velocities/airspeed-kt[0]", true)), - p_vvi(fgGetNode("/velocities/vertical-speed-fps[0]", true )), - p_mach(fgGetNode("/velocities/mach[0]", true )), + p_park_brake(fgGetNode("/controls/gear/brake-parking", true)), egt0_node(fgGetNode("/engines/engine/EGT_degC[0]", true)), egt1_node(fgGetNode("/engines/engine[1]/EGT_degC[0]", true)), egt2_node(fgGetNode("/engines/engine[2]/EGT_degC[0]", true)), @@ -94,13 +98,8 @@ FGOpenGC::FGOpenGC() : tank5_node(fgGetNode("/consumables/fuel/tank[5]/level-lb[0]", true)), tank6_node(fgGetNode("/consumables/fuel/tank[6]/level-lb[0]", true)), tank7_node(fgGetNode("/consumables/fuel/tank[7]/level-lb[0]", true)), - p_park_brake(fgGetNode("/controls/gear/brake-parking", true)), - p_pitch(fgGetNode("/orientation/pitch-deg[0]", true)), - p_bank(fgGetNode("/orientation/roll-deg[0]", true)), - p_heading(fgGetNode("/orientation/heading-magnetic-deg[0]", true)), - p_yaw(fgGetNode("/fdm/jsbsim/aero/beta-rad[0]", true)), - p_yaw_rate(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)) - + p_alphadot(fgGetNode("/fdm/jsbsim/aero/alphadot-rad_sec[0]", true)), + p_betadot(fgGetNode("/fdm/jsbsim/aero/betadot-rad_sec[0]", true)) { } diff --git a/src/Network/opengc.hxx b/src/Network/opengc.hxx index c3210d38e..0f7ad4c38 100644 --- a/src/Network/opengc.hxx +++ b/src/Network/opengc.hxx @@ -39,7 +39,6 @@ class FGOpenGC : public FGProtocol, public FGInterface { ogcFGData buf; - int length; // Environment SGPropertyNode_ptr press_node;