diff --git a/src/dbi.c b/src/dbi.c index 888f0e03..acadf0e5 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -3,6 +3,7 @@ #include "internals.h" +#if MDBX_ENABLE_DBI_SPARSE size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) { tASSERT(txn, bmi > 0); bmi &= -bmi; @@ -20,6 +21,7 @@ size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) { return debruijn_ctz32[(UINT32_C(0x077CB531) * (uint32_t)bmi) >> 27]; } } +#endif /* MDBX_ENABLE_DBI_SPARSE */ struct dbi_snap_result dbi_snap(const MDBX_env *env, const size_t dbi) { eASSERT(env, dbi < env->n_dbi); diff --git a/src/dbi.h b/src/dbi.h index 4c66c664..bfafe3e3 100644 --- a/src/dbi.h +++ b/src/dbi.h @@ -5,11 +5,11 @@ #include "essentials.h" +#if MDBX_ENABLE_DBI_SPARSE + MDBX_NOTHROW_CONST_FUNCTION MDBX_MAYBE_UNUSED MDBX_INTERNAL size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi); -#if MDBX_ENABLE_DBI_SPARSE - static inline size_t dbi_bitmap_ctz(const MDBX_txn *txn, intptr_t bmi) { tASSERT(txn, bmi > 0); STATIC_ASSERT(sizeof(bmi) >= sizeof(txn->dbi_sparse[0]));