From 7cfcc9ff7ac7c7f03c5a84edf674142f874c26c1 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 18 Aug 2016 15:35:21 +0300 Subject: [PATCH] mdbx: check assertions depending on NDEBUG. Change-Id: I0c8ce98242e7451dd82f8abfbac70b2f4dcfa7a0 --- mdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index e045aaea..f49359cb 100644 --- a/mdb.c +++ b/mdb.c @@ -1251,7 +1251,11 @@ static txnid_t mdbx_oomkick(MDB_env *env, txnid_t oldest); (type & (MDBX_DBG_TRACE | MDBX_DBG_EXTRA))) #else -# define mdb_debug_enabled(type) (0) +# ifndef NDEBUG +# define mdb_debug_enabled(type) (1) +# else +# define mdb_debug_enabled(type) (0) +# endif # define mdb_audit_enabled() (0) # define mdb_assert_enabled() (0) # define mdb_assert_fail(env, msg, func, line) \