From 3b024e3dab4b09122a4b71deac4889ecda4355dc Mon Sep 17 00:00:00 2001 From: fredb Date: Sun, 14 Jun 2009 11:00:01 +0000 Subject: [PATCH] Suppress warnings --- src/Instrumentation/mk_viii.hxx | 9 +++++++++ src/Main/fg_commands.cxx | 2 +- src/Model/modelmgr.cxx | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/mk_viii.hxx b/src/Instrumentation/mk_viii.hxx index afacd10fd..8a28d4adc 100755 --- a/src/Instrumentation/mk_viii.hxx +++ b/src/Instrumentation/mk_viii.hxx @@ -40,6 +40,11 @@ using std::map; #include #include
+#ifdef _MSC_VER +# pragma warning( push ) +# pragma warning( disable: 4355 ) +#endif + /////////////////////////////////////////////////////////////////////////////// // MK_VIII //////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -1646,4 +1651,8 @@ public: virtual void update (double dt); }; +#ifdef _MSC_VER +# pragma warning( pop ) +#endif + #endif // __INSTRUMENTS_MK_VIII_HXX diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 58546014d..7ca69fca4 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1250,7 +1250,7 @@ do_play_audio_sample (const SGPropertyNode * arg) fx->play_message( path, file, volume ); return true; - } catch (const sg_io_exception& e) { + } catch (const sg_io_exception&) { SG_LOG(SG_GENERAL, SG_ALERT, "play-audio-sample: " "failed to load" << path << '/' << file); return false; diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 2b547cf02..600086d29 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -3,6 +3,10 @@ // // This file is in the Public Domain, and comes with no warranty. +#ifdef _MSC_VER +# pragma warning( disable: 4355 ) +#endif + #ifdef HAVE_CONFIG_H # include #endif @@ -172,7 +176,7 @@ struct UpdateFunctor : public std::unary_function pitch = testNan(instance->pitch_deg_node->getDoubleValue()); if (instance->heading_deg_node != 0) heading = testNan(instance->heading_deg_node->getDoubleValue()); - } catch (const sg_range_exception& e) { + } catch (const sg_range_exception&) { const char *path = instance->node->getStringValue("path", "unknown"); SG_LOG(SG_GENERAL, SG_INFO, "Instance of model " << path