Visualc.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /******************************************************************************
  19. *
  20. * FILE
  21. * $Archive: $
  22. *
  23. * DESCRIPTION
  24. * Disable specific warnings generated by Microsoft Visual C++ 6.0
  25. *
  26. * PROGRAMMER
  27. * Denzil E. Long, Jr.
  28. * $Author: $
  29. *
  30. * VERSION INFO
  31. * $Modtime: $
  32. * $Revision: $
  33. *
  34. ******************************************************************************/
  35. #pragma once
  36. #ifndef _VISUALC_H_
  37. #define _VISUALC_H_
  38. #if defined(_MSC_VER)
  39. // "unreferenced inline function has been removed"
  40. // Inline functions are used in headers and this warning will appear everywhere
  41. // without explicitly being disabled.
  42. #pragma warning(disable:4514)
  43. // "conversion from 'double' to 'float', possible loss of data"
  44. // This occurs during non-constant floating point arithmetic. Since all floating
  45. // point math is silently upcasted to doubles, it should silently downcast
  46. // back to 'float' when complete -- hence this warning should not be displayed.
  47. #pragma warning(disable:4244)
  48. // "overflow in floating-point constant arithmetic"
  49. // This warning occurs even when there is no overflow. It occurs when a double
  50. // is downcasted to a float during constant arithmetic (this is not worthy of
  51. // a warning message).
  52. #pragma warning(disable:4056)
  53. // "argument trunation from const double to float"
  54. // This warning is of little use since the compiler uses doubles whenever
  55. // possible, therfore this warning will appear frequently. It is similar to
  56. // warning 4244 and is similarly irrelevant.
  57. #pragma warning(disable:4305)
  58. // "'this' used in base member initializer list"
  59. // Using "this" in a base member initializer is valid -- no need for this warning.
  60. #pragma warning(disable:4355)
  61. // "typedef-name used as a synonym for class-name"
  62. // This is by design and should not be a warning.
  63. #pragma warning(disable:4097)
  64. // "function not inlined"
  65. // This warning is typically useless. The inline keyword only serves as a
  66. // suggestion to the compiler and it may or may not inline a function on a
  67. // case by case basis. No need to be told of this.
  68. #pragma warning(disable:4710)
  69. // "function selected for automatic inline expansion"
  70. // There is no need to announce this with a warning message.
  71. #pragma warning(disable:4711)
  72. // "identifier was truncated to 'number' characters in the debug information"
  73. // The debugger cannot debug code with symbols longer than 255 characters.
  74. // In the debugger, you cannot view, evaluate, update, or watch the truncated symbols.
  75. #pragma warning(disable:4786)
  76. #endif // _MSC_VER
  77. #endif // _VISUALC_H_