mdbx: avoid paranoid CLANG's enum ops UB.

This commit is contained in:
Leonid Yuriev
2020-11-17 15:00:51 +03:00
parent 11fde67edc
commit 94fae97f88
4 changed files with 39 additions and 22 deletions

View File

@@ -80,8 +80,8 @@ bool testcase_nested::teardown() {
void testcase_nested::push_txn() {
MDBX_txn *txn;
MDBX_txn_flags_t flags =
MDBX_txn_flags_t(prng32() & (MDBX_TXN_NOSYNC | MDBX_TXN_NOMETASYNC));
MDBX_txn_flags_t flags = MDBX_txn_flags_t(
prng32() & uint32_t(MDBX_TXN_NOSYNC | MDBX_TXN_NOMETASYNC));
int err = mdbx_txn_begin(db_guard.get(), txn_guard.get(), flags, &txn);
if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_begin(nested)", err);