Check that _MSC_VER is defined before comparing its value. Otherwise the comparison ends up true on non-MSVC compilers

This commit is contained in:
Mia McMahill 2026-07-16 01:09:24 -05:00
parent 7b06a4ce6d
commit f24511bdaa
2 changed files with 2 additions and 2 deletions

View file

@ -154,7 +154,7 @@ void _ReportError(const char* file, int line, const char* func,
#endif
}
#if _MSC_VER < 1400
#if defined(_MSC_VER) && _MSC_VER < 1400
void NET_ReportError(const char* fmt, ...)
{
va_list ap;

View file

@ -32,7 +32,7 @@ namespace odalpapi
void _ReportError(const char* file, int line, const char* func,
const char* fmt, ...);
#if (_MSC_VER < 1400) // __VA_ARGS__ not supported by older ANSI C++
#if defined(_MSC_VER) && (_MSC_VER < 1400) // __VA_ARGS__ not supported by older ANSI C++
void NET_ReportError(const char* fmt, ...);
#else
#define NET_ReportError(...) \