Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
3.8 KiB

  1. //+-------------------------------------------------------------------------
  2. // Microsoft OLE
  3. // Copyright (C) Microsoft Corporation, 1994 - 1995.
  4. //
  5. // File: diswarn.h
  6. //
  7. // Contents: Pragma's to disable specific warnings at W4
  8. // This file is included through the use of the
  9. // COMPILER_WARNING macro in build make files.
  10. // EG see the comtools\comday.mk file.
  11. //
  12. // History: 02-Aug-95 DaveY Taken from CTOLEUI's killwarn.hxx
  13. //
  14. //
  15. //--------------------------------------------------------------------------
  16. #ifndef __DISWARN_H__
  17. #define __DISWARN_H__
  18. //
  19. // NT groups overall disable warning in sdk\inc\warning.h
  20. //
  21. #ifndef _MAC
  22. #include <warning.h>
  23. #endif
  24. //
  25. // Removal of these warnings is temporary. The reason for being here
  26. // is that build removes these warnings from build.wrn.
  27. // BUGBUG These are here for now, until they can be investigated more.
  28. //
  29. #pragma warning(disable: 4001)
  30. #pragma warning(disable: 4010)
  31. #pragma warning(disable: 4056)
  32. #pragma warning(disable: 4061)
  33. #pragma warning(disable: 4100)
  34. #pragma warning(disable: 4101)
  35. #pragma warning(disable: 4102)
  36. #pragma warning(disable: 4127)
  37. #pragma warning(disable: 4135)
  38. #pragma warning(disable: 4201)
  39. #pragma warning(disable: 4204)
  40. #pragma warning(disable: 4208)
  41. #pragma warning(disable: 4509)
  42. #pragma warning(disable: 4047)
  43. #pragma warning(disable: 4022)
  44. #pragma warning(disable: 4053)
  45. // these mainly come from midl files
  46. #pragma warning(disable: 4211)
  47. #pragma warning(disable: 4152)
  48. //
  49. // Turn off: access-declarations are deprecated; member using-declarations
  50. // provide a better alternative
  51. //
  52. #pragma warning(disable: 4516)
  53. // Turn off: non standard extension used: bit field types other than int
  54. //
  55. #pragma warning(disable: 4214)
  56. // Turn off: unreferenced inline function has been removed
  57. //
  58. #pragma warning(disable: 4514)
  59. // nonstandard extension used : nameless struct/union
  60. //
  61. // Microsoft C/C++ allows structure declarations to be specified without a
  62. // declarator when they are members of another structure or union.
  63. // The following is an example of this error:
  64. //
  65. // struct S
  66. // {
  67. // float y;
  68. // struct
  69. // {
  70. // int a, b, c; // warning
  71. // };
  72. // } *p_s;
  73. //
  74. //
  75. // This extension can prevent your code from being portable to other
  76. // compilers and will generate an error under the /Za command-line option.
  77. #pragma warning(disable: 4201)
  78. // Turn off: Macro not expanded
  79. //
  80. #pragma warning(disable: 4710)
  81. // 'class' : copy constructor could not be generated
  82. //
  83. // The compiler was unable to generate a default constructor for the given
  84. // class. No constructor was created.
  85. //
  86. // This warning can be caused by having an copy operator for the
  87. // base class that is not accessible by the derived class.
  88. //
  89. // This warning can be avoided by specifying a copy constructor for the class.
  90. #pragma warning(disable: 4511)
  91. // 'class' : assignment operator could not be generated
  92. //
  93. // The compiler was unable to generate a default constructor for the given
  94. // class. No constructor was created.
  95. //
  96. // This warning can be caused by having an assignment operator for the
  97. // base class that is not accessible by the derived class.
  98. //
  99. // This warning can be avoided by specifying a user-defined assignment
  100. // operator for the class.
  101. #pragma warning(disable: 4512)
  102. #ifdef PPC
  103. // Turn off for PPC only since PPC compiler doesn't get it right
  104. // local variable may be used without having been initialized.
  105. //
  106. #pragma warning(disable: 4701)
  107. #endif
  108. #ifdef _MAC
  109. // Turn off for _MAC only because it doesn't handle trigraphs in comments
  110. // correctly
  111. #pragma warning(disable: 4110)
  112. // The Mac OS headers generate this
  113. #pragma warning (disable: 4121)
  114. #endif // _MAC
  115. #endif // __DISWARN_H__