From d8674400d92e5a38e678093546b202fb7a305590 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 28 Jun 2012 22:34:08 +0000 Subject: [PATCH] Disable a bunch of warnings for MS Visual C++. git-svn-id: https://svn.dealii.org/trunk@25657 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 2 +- deal.II/configure.in | 18 ++++++++++++++++++ deal.II/include/deal.II/base/config.h.in | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/deal.II/configure b/deal.II/configure index c917411264..1bfe85c80a 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 25614 . +# From configure.in Revision: 25636 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for deal.II 7.2.pre. # diff --git a/deal.II/configure.in b/deal.II/configure.in index e80fe5e008..747709fe0e 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -907,6 +907,24 @@ AH_BOTTOM( #include #include +// Disable a bunch of warnings for Microsoft Visual C++. We should +// work on reducing this list over time to those that are truly +// harmless and not indicative of actual problems +#ifdef DEAL_II_MSVC +# pragma warning( disable : 4244 ) // implied downcasting from double to float +# pragma warning( disable : 4267 ) // implied downcasting from size_t to unsigned int +# pragma warning( disable : 4996 ) // unsafe functions, such as strcat and sprintf +# pragma warning( disable : 4355 ) // 'this' : used in base member initializer list +# pragma warning( disable : 4661 ) // no suitable definition provided for explicit template instantiation request +# pragma warning( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning) +# pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned +# pragma warning( disable : 4667 ) // no function template defined that matches forced instantiation +# pragma warning( disable : 4520 ) // multiple default constructors specified +# pragma warning( disable : 4700 ) // uninitialized local variable +# pragma warning( disable : 4789 ) // destination of memory copy is too small +# pragma warning( disable : 4808 ) // case 'value' is not a valid value for switch condition of type 'bool +#endif // DEAL_II_MSVC + #endif ]) diff --git a/deal.II/include/deal.II/base/config.h.in b/deal.II/include/deal.II/base/config.h.in index 68f063e993..4e3186b635 100644 --- a/deal.II/include/deal.II/base/config.h.in +++ b/deal.II/include/deal.II/base/config.h.in @@ -699,5 +699,23 @@ #include #include +// Disable a bunch of warnings for Microsoft Visual C++. We should +// work on reducing this list over time to those that are truly +// harmless and not indicative of actual problems +#ifdef DEAL_II_MSVC +# pragma warning( disable : 4244 ) // implied downcasting from double to float +# pragma warning( disable : 4267 ) // implied downcasting from size_t to unsigned int +# pragma warning( disable : 4996 ) // unsafe functions, such as strcat and sprintf +# pragma warning( disable : 4355 ) // 'this' : used in base member initializer list +# pragma warning( disable : 4661 ) // no suitable definition provided for explicit template instantiation request +# pragma warning( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning) +# pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned +# pragma warning( disable : 4667 ) // no function template defined that matches forced instantiation +# pragma warning( disable : 4520 ) // multiple default constructors specified +# pragma warning( disable : 4700 ) // uninitialized local variable +# pragma warning( disable : 4789 ) // destination of memory copy is too small +# pragma warning( disable : 4808 ) // case 'value' is not a valid value for switch condition of type 'bool +#endif // DEAL_II_MSVC + #endif -- 2.39.5