mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:14:14 +08:00
mdbx-test: fix warnings from MSVC 2013.
This commit is contained in:
parent
a9faaaaf21
commit
e3fcc4754e
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -63,7 +63,7 @@ struct txn_deleter : public std::unary_function<void, MDBX_txn *> {
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user