diff --git a/src/bits.h b/src/bits.h index f5fc18a3..446b1e19 100644 --- a/src/bits.h +++ b/src/bits.h @@ -42,7 +42,9 @@ # ifndef _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS # endif -#pragma warning(disable : 4464) /* relative include path contains '..' */ +#if _MSC_VER > 1800 +# pragma warning(disable : 4464) /* relative include path contains '..' */ +#endif #pragma warning(disable : 4710) /* 'xyz': function not inlined */ #pragma warning(disable : 4711) /* function 'xyz' selected for automatic inline expansion */ #pragma warning(disable : 4201) /* nonstandard extension used : nameless struct / union */ diff --git a/src/mdbx.c b/src/mdbx.c index d7d76607..1ee9790c 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -37,14 +37,12 @@ #include "./bits.h" -#ifdef _MSC_VER -#if _MSC_VER < 1910 -/* LY: MSVC has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg +#if defined(_MSC_VER) && _MSC_VER == 1900 +/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg checker for size_t typedef. */ #pragma warning(disable : 4777) /* format string '%10u' requires an argument \ of type 'unsigned int', but variadic \ argument 1 has type 'std::size_t' */ -#endif #endif /* _MSC_VER (warnings) */ /*----------------------------------------------------------------------------*/