mdbx: fix minor/paranoid MSVC warning.

This commit is contained in:
Leonid Yuriev 2021-10-24 02:28:28 +03:00
parent 113162b651
commit 93a24abbab
2 changed files with 6 additions and 5 deletions

View File

@ -1277,6 +1277,7 @@ pmax
pmccntr pmccntr
pmcntenset pmcntenset
pmedvedev pmedvedev
pmeta
pmr pmr
pmuseren pmuseren
pmwkaa pmwkaa

View File

@ -11871,15 +11871,15 @@ __cold static int mdbx_setup_dxb(MDBX_env *env, const int lck_rc,
if ((env->me_flags & MDBX_RDONLY) == 0 && env->me_stuck_meta < 0) { if ((env->me_flags & MDBX_RDONLY) == 0 && env->me_stuck_meta < 0) {
for (int n = 0; n < 3; ++n) { for (int n = 0; n < 3; ++n) {
MDBX_meta *const meta = METAPAGE(env, n); MDBX_meta *const pmeta = METAPAGE(env, n);
if (unlikely(unaligned_peek_u64(4, &meta->mm_magic_and_version) != if (unlikely(unaligned_peek_u64(4, &pmeta->mm_magic_and_version) !=
MDBX_DATA_MAGIC)) { MDBX_DATA_MAGIC)) {
const txnid_t txnid = mdbx_meta_txnid_fluid(env, meta); const txnid_t txnid = mdbx_meta_txnid_fluid(env, pmeta);
mdbx_notice("%s %s" mdbx_notice("%s %s"
"meta[%u], txnid %" PRIaTXN, "meta[%u], txnid %" PRIaTXN,
"updating db-format signature for", "updating db-format signature for",
META_IS_STEADY(meta) ? "stead-" : "weak-", n, txnid); META_IS_STEADY(pmeta) ? "stead-" : "weak-", n, txnid);
err = mdbx_override_meta(env, n, txnid, meta); err = mdbx_override_meta(env, n, txnid, pmeta);
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
mdbx_error("%s meta[%u], txnid %" PRIaTXN ", error %d", mdbx_error("%s meta[%u], txnid %" PRIaTXN ", error %d",
"updating db-format signature for", n, txnid, err); "updating db-format signature for", n, txnid, err);