From 4ae7c90d49ef500d9e8cbd87b88888ecd06416ef Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sun, 25 Dec 2011 14:40:07 +0100 Subject: [PATCH] Small warning fixes, mostly unused variables --- simgear/hla/RTI13Ambassador.hxx | 2 +- simgear/io/sg_socket_udp.cxx | 3 --- simgear/magvar/testmagvar.cxx | 6 +++--- simgear/scene/sky/cloudfield.cxx | 2 +- simgear/scene/sky/dome.cxx | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/simgear/hla/RTI13Ambassador.hxx b/simgear/hla/RTI13Ambassador.hxx index ecd0af60..95a2ab38 100644 --- a/simgear/hla/RTI13Ambassador.hxx +++ b/simgear/hla/RTI13Ambassador.hxx @@ -90,7 +90,7 @@ public: // { _rtiAmbassador.sendInteraction(interactionClassHandle, parameters, tag.data()); } void deleteObjectInstance(const RTI::ObjectHandle& objectHandle, const SGTimeStamp& timeStamp, const RTIData& tag) - { RTI::EventRetractionHandle h = _rtiAmbassador.deleteObjectInstance(objectHandle, toFedTime(timeStamp), tag.data()); } + { /* RTI::EventRetractionHandle h = */ _rtiAmbassador.deleteObjectInstance(objectHandle, toFedTime(timeStamp), tag.data()); } void deleteObjectInstance(const RTI::ObjectHandle& objectHandle, const RTIData& tag) { _rtiAmbassador.deleteObjectInstance(objectHandle, tag.data()); } void localDeleteObjectInstance(const RTI::ObjectHandle& objectHandle) diff --git a/simgear/io/sg_socket_udp.cxx b/simgear/io/sg_socket_udp.cxx index 82b23757..acf7e9e5 100644 --- a/simgear/io/sg_socket_udp.cxx +++ b/simgear/io/sg_socket_udp.cxx @@ -162,11 +162,8 @@ int SGSocketUDP::write( const char *buf, const int length ) { return 0; } - bool error_condition = false; - if ( sock.send( buf, length, 0 ) < 0 ) { SG_LOG( SG_IO, SG_WARN, "Error writing to socket: " << port ); - error_condition = true; return 0; } diff --git a/simgear/magvar/testmagvar.cxx b/simgear/magvar/testmagvar.cxx index f3ce3e1c..965c0c40 100644 --- a/simgear/magvar/testmagvar.cxx +++ b/simgear/magvar/testmagvar.cxx @@ -16,7 +16,7 @@ int main(int argc, char *argv[]) /* output N, E, down components of B (nTesla) dip angle (down positive), variation (E positive) */ double lat_deg,lon_deg,h,var; -int model,yy,mm,dd; +int /* model,*/yy,mm,dd; double field[6]; if ((argc != 8) && (argc !=7)) { @@ -36,9 +36,9 @@ mm= (int)strtol(argv[4],NULL,10); dd= (int)strtol(argv[5],NULL,10); yy= (int)strtol(argv[6],NULL,10); if (argc == 8){ - model= (int)strtol(argv[7],NULL,10); +// model= (int)strtol(argv[7],NULL,10); }else{ - model=7; +// model=7; } diff --git a/simgear/scene/sky/cloudfield.cxx b/simgear/scene/sky/cloudfield.cxx index 086899d7..1a801909 100644 --- a/simgear/scene/sky/cloudfield.cxx +++ b/simgear/scene/sky/cloudfield.cxx @@ -113,7 +113,7 @@ bool SGCloudField::reposition( const SGVec3f& p, const SGVec3f& up, double lon, osg::Quat ftainv = field_transform->getAttitude().inverse(); // delta is the vector from the old position to the new position in cloud-coords - osg::Vec3f delta = ftainv * (osg_pos - old_pos); + // osg::Vec3f delta = ftainv * (osg_pos - old_pos); old_pos = osg_pos; // Check if any of the clouds should be moved. diff --git a/simgear/scene/sky/dome.cxx b/simgear/scene/sky/dome.cxx index b4dacd08..5cd40cb4 100644 --- a/simgear/scene/sky/dome.cxx +++ b/simgear/scene/sky/dome.cxx @@ -294,7 +294,7 @@ SGSkyDome::repaint( const SGVec3f& sun_color, const SGVec3f& sky_color, const double saif = sun_angle/SG_PI; static const SGVec3f blueShift(0.8, 1.0, 1.2); const SGVec3f skyFogDelta = sky_color - fog_color; - const SGVec3f sunSkyDelta = sun_color - sky_color; +// const SGVec3f sunSkyDelta = sun_color - sky_color; // For now the colors of the upper two rings are linearly // interpolated between the zenith color and the first horizon -- 2.39.5