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.

78 lines
2.1 KiB

  1. // Copyright (c) 2000 Microsoft Corporation
  2. // the sources file should specify warning level 4. But with warning level
  3. // 4, most of the SDK and CRT headers fail to compile (isn't that nice?).
  4. // So, here we set the warning level to 3 while we compile the headers
  5. #pragma warning(push, 3)
  6. #include <nt.h>
  7. #include <ntrtl.h>
  8. #include <nturtl.h>
  9. #include <windows.h>
  10. #include <ole2.h>
  11. #include <comutil.h>
  12. #include <mmcobj.h>
  13. #pragma warning(pop)
  14. #include <shellapi.h>
  15. // disable "symbols too long for debugger" warning: it happens a lot w/ STL
  16. #pragma warning (disable: 4786)
  17. // disable "exception specification ignored" warning: we use exception
  18. // specifications
  19. #pragma warning (disable: 4290)
  20. // who cares about unreferenced inline removal?
  21. #pragma warning (disable: 4514)
  22. // we frequently use constant conditional expressions: do/while(0), etc.
  23. #pragma warning (disable: 4127)
  24. // some stl templates are lousy signed/unsigned mismatches
  25. #pragma warning (disable: 4018 4146)
  26. // we like this extension
  27. #pragma warning (disable: 4239)
  28. // Use of pointer types with STL container classes generates this beauty,
  29. // which is a warning if the situation it warns agains is
  30. // ever encountered, that code will fail to compile.
  31. //
  32. // The problem is that iterator classes define operator-> to return a pointer
  33. // to the element type T of the container. When that element is itself a
  34. // pointer, then the return type of is a pointer to pointer, which has no
  35. // members or methods to invoke. So code like
  36. //
  37. // list<Foo*> l;
  38. // list<Foo*>::iterator i = l.begin();
  39. // i->f();
  40. //
  41. // will not compile, as the type Foo* does not have a method f(). So if the
  42. // code will not compile, why warn about the potential for such code to exist?
  43. #pragma warning (disable: 4284)
  44. // often, we have local variables for the express purpose of ASSERTion.
  45. // when compiling retail, those assertions disappear, leaving our locals
  46. // as unreferenced.
  47. #ifndef DBG
  48. #pragma warning (disable: 4189 4100)
  49. #endif // DBG