1  #ifndef _MSC_VER
       2  #pragma error "This header is for Microsoft VC or clang-cl only."
       3  #endif /* _MSC_VER */
       4  
       5  /* Make MSVC more pedantic, this is a recommended pragma list
       6   * from _Win32_Programming_ by Rector and Newcomer.
       7   */
       8  #ifndef __clang__
       9  #pragma warning(error:4002) /* too many actual parameters for macro */
      10  #pragma warning(error:4003) /* not enough actual parameters for macro */
      11  #pragma warning(1:4010)     /* single-line comment contains line-continuation character */
      12  #pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */
      13  #pragma warning(1:4016)     /* no function return type; using int as default */
      14  #pragma warning(error:4020) /* too many actual parameters */
      15  #pragma warning(error:4021) /* too few actual parameters */
      16  #pragma warning(error:4027) /* function declared without formal parameter list */
      17  #pragma warning(error:4029) /* declared formal parameter list different from definition */
      18  #pragma warning(error:4033) /* 'function' must return a value */
      19  #pragma warning(error:4035) /* 'function' : no return value */
      20  #pragma warning(error:4045) /* array bounds overflow */
      21  #pragma warning(error:4047) /* different levels of indirection */
      22  #pragma warning(error:4049) /* terminating line number emission */
      23  #pragma warning(error:4053) /* An expression of type void was used as an operand */
      24  #pragma warning(error:4071) /* no function prototype given */
      25  #pragma warning(disable:4101) /* unreferenced local variable */
      26  #pragma warning(error:4150)
      27  
      28  /* G_NORETURN */
      29  #pragma warning(error:4646) /* function declared with __declspec(noreturn) has non-void return type */
      30  #pragma warning(error:4715) /* 'function': not all control paths return a value */
      31  #pragma warning(error:4098) /* 'void' function returning a value */
      32  
      33  #pragma warning(disable:4244)	/* No possible loss of data warnings */
      34  #pragma warning(disable:4305)   /* No truncation from int to char warnings */
      35  
      36  #pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */
      37  #endif                      /* __clang__ */
      38  
      39  /* work around Microsoft's premature attempt to deprecate the C-Library */
      40  #define _CRT_SECURE_NO_WARNINGS
      41  #define _CRT_NONSTDC_NO_WARNINGS