From 93a24abbabfb46fcf47cfc1b2311bf426fcd3e4f Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 24 Oct 2021 02:28:28 +0300 Subject: [PATCH] mdbx: fix minor/paranoid MSVC warning. --- .github/actions/spelling/expect.txt | 1 + src/core.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 1d15c475..3092e5d1 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1277,6 +1277,7 @@ pmax pmccntr pmcntenset pmedvedev +pmeta pmr pmuseren pmwkaa diff --git a/src/core.c b/src/core.c index e1354826..ce297d8a 100644 --- a/src/core.c +++ b/src/core.c @@ -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) { for (int n = 0; n < 3; ++n) { - MDBX_meta *const meta = METAPAGE(env, n); - if (unlikely(unaligned_peek_u64(4, &meta->mm_magic_and_version) != + MDBX_meta *const pmeta = METAPAGE(env, n); + if (unlikely(unaligned_peek_u64(4, &pmeta->mm_magic_and_version) != 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" "meta[%u], txnid %" PRIaTXN, "updating db-format signature for", - META_IS_STEADY(meta) ? "stead-" : "weak-", n, txnid); - err = mdbx_override_meta(env, n, txnid, meta); + META_IS_STEADY(pmeta) ? "stead-" : "weak-", n, txnid); + err = mdbx_override_meta(env, n, txnid, pmeta); if (unlikely(err != MDBX_SUCCESS)) { mdbx_error("%s meta[%u], txnid %" PRIaTXN ", error %d", "updating db-format signature for", n, txnid, err);