_warnings_off.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* This header turns off warnings that STLport headers generate for compiled
  2. * user code.
  3. */
  4. #if defined (_STLP_MSVC)
  5. # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
  6. defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
  7. /*
  8. * 31/07/2004: dums - now that we do not export the basic_string class anymore but only a base class
  9. * we have to disable this warning as the string are used as data members type of many iostream classes.
  10. */
  11. # pragma warning ( disable : 4251 ) // ignore template classes being exported in .dll's
  12. # endif
  13. # if (_STLP_MSVC < 1300) // VC6, eVC3, eVC4
  14. # pragma warning( disable : 4097 ) // typedef-name used as based class of (...)
  15. # pragma warning( disable : 4231 ) // non standard extension : 'extern' before template instanciation
  16. # pragma warning( disable : 4244 ) // implicit conversion: possible loss of data
  17. # pragma warning( disable : 4284 ) // for -> operator
  18. //This warning is necessary because of the native platform headers:
  19. # pragma warning( disable : 4290 ) // c++ exception specification ignored
  20. # pragma warning( disable : 4514 ) // unreferenced inline function has been removed
  21. # pragma warning( disable : 4660 ) // template-class specialization '...' is already instantiated
  22. # pragma warning( disable : 4701 ) // local variable '...' may be used without having been initialized
  23. # pragma warning( disable : 4710 ) // function (...) not inlined
  24. # pragma warning( disable : 4786 ) // identifier truncated to 255 characters
  25. # endif
  26. # if (_STLP_MSVC < 1400)
  27. # pragma warning( disable : 4511 ) // copy constructor cannot be generated
  28. # endif
  29. //Pool of common warnings for all MSVC supported versions:
  30. //Many are only useful if warning level is set to 4.
  31. # pragma warning( disable : 4100 ) // unreferenced formal parameter
  32. # pragma warning( disable : 4127 ) // conditional expression is constant
  33. # pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned
  34. # pragma warning( disable : 4245 ) // conversion from 'enum ' to 'unsigned int', signed/unsigned mismatch
  35. # pragma warning( disable : 4355 ) // this used in base member initializer list (used in rope implementation)
  36. # pragma warning( disable : 4510 ) // default constructor cannot be generated
  37. # pragma warning( disable : 4512 ) // assignment operator could not be generated
  38. # pragma warning( disable : 4571 ) // catch(...) blocks compiled with /EHs do not catch or re-throw Structured Exceptions
  39. # pragma warning( disable : 4610 ) // struct '...' can never be instantiated - user defined construtor required
  40. #elif defined (__BORLANDC__)
  41. # pragma option -w-ccc // -w-8008 Condition is always true OR Condition is always false
  42. # pragma option -w-inl // -w-8027 Functions containing reserved words are not expanded inline
  43. # pragma option -w-ngu // -w-8041 Negating unsigned value
  44. # pragma option -w-pow // -w-8062 Previous options and warnings not restored
  45. # pragma option -w-rch // -w-8066 Unreachable code
  46. # pragma option -w-par // -w-8057 Parameter 'parameter' is never used
  47. #endif