From 4ad1c2daedb165cbf684d4c14bdcdb6f0efcdbf5 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 7 Apr 2020 01:54:58 +0300 Subject: [PATCH] mdbx: minor fix/workaround to avoid GCC 10.x pedantic warnings. Change-Id: If67c1ae593ad2c39130054475c37321dca761f5b --- src/elements/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/elements/core.c b/src/elements/core.c index 8986aeac..d9bddbbe 100644 --- a/src/elements/core.c +++ b/src/elements/core.c @@ -4933,7 +4933,7 @@ skip_cache: goto fail; } - MDBX_cursor recur; + MDBX_cursor_couple recur; for (MDBX_cursor_op op = MDBX_FIRST;; op = (flags & MDBX_LIFORECLAIM) ? MDBX_PREV : MDBX_NEXT) { MDBX_val key, data; @@ -4979,7 +4979,7 @@ skip_cache: /* Prepare to fetch more and coalesce */ oldest = (flags & MDBX_LIFORECLAIM) ? mdbx_find_oldest(txn) : *env->me_oldest; - rc = mdbx_cursor_init(&recur, txn, FREE_DBI); + rc = mdbx_cursor_init(&recur.outer, txn, FREE_DBI); if (unlikely(rc != MDBX_SUCCESS)) goto fail; if (flags & MDBX_LIFORECLAIM) { @@ -5007,7 +5007,7 @@ skip_cache: } } - rc = mdbx_cursor_get(&recur, &key, NULL, op); + rc = mdbx_cursor_get(&recur.outer, &key, NULL, op); if (rc == MDBX_NOTFOUND && (flags & MDBX_LIFORECLAIM)) { if (op == MDBX_SET_RANGE) continue; @@ -5018,7 +5018,7 @@ skip_cache: key.iov_base = &last; key.iov_len = sizeof(last); op = MDBX_SET_RANGE; - rc = mdbx_cursor_get(&recur, &key, NULL, op); + rc = mdbx_cursor_get(&recur.outer, &key, NULL, op); } } if (unlikely(rc)) { @@ -5058,9 +5058,10 @@ skip_cache: } /* Reading next GC record */ - np = recur.mc_pg[recur.mc_top]; + np = recur.outer.mc_pg[recur.outer.mc_top]; if (unlikely((rc = mdbx_node_read( - &recur, page_node(np, recur.mc_ki[recur.mc_top]), + &recur.outer, + page_node(np, recur.outer.mc_ki[recur.outer.mc_top]), &data)) != MDBX_SUCCESS)) goto fail;