diff --git a/test/base.h b/test/base.h index e87f0240..0ed927da 100644 --- a/test/base.h +++ b/test/base.h @@ -20,6 +20,7 @@ #if defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS) #ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS #pragma warning(push, 1) #pragma warning(disable : 4548) /* expression before comma has no effect; \ expected expression with side - effect */ @@ -91,4 +92,12 @@ #pragma warning(disable : 4201) /* nonstandard extension used : \ nameless struct / union */ #pragma warning(disable : 4127) /* conditional expression is constant */ +#if _MSC_VER < 1900 +#pragma warning(disable : 4510) /* default constructor could not be generated */ +#pragma warning(disable : 4512) /* assignment operator could not be generated */ +#pragma warning(disable : 4610) /* user-defined constructor required */ +#define snprintf _snprintf +#pragma warning(disable : 4996) /* 'vsnprintf': This function or variable \ + may be unsafe */ #endif +#endif /* _MSC_VER */ diff --git a/test/keygen.h b/test/keygen.h index f109bf40..911ea6d8 100644 --- a/test/keygen.h +++ b/test/keygen.h @@ -71,7 +71,7 @@ namespace keygen { typedef uint64_t serial_t; -enum { +enum : serial_t { serial_minwith = 8, serial_maxwith = sizeof(serial_t) * 8, serial_allones = ~(serial_t)0 diff --git a/test/test.h b/test/test.h index 0a9b8a38..bae5eb0d 100644 --- a/test/test.h +++ b/test/test.h @@ -63,7 +63,7 @@ struct txn_deleter : public std::unary_function { void operator()(MDBX_txn *txn) const { int rc = mdbx_txn_abort(txn); if (rc) - log_trouble(__func__, "mdbx_txn_abort()", rc); + log_trouble(mdbx_func_, "mdbx_txn_abort()", rc); } };