mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-31 16:48:20 +08:00
mdbx: fix unused
warning for case MDBX_ENABLE_PGOP_STAT=0
.
This commit is contained in:
parent
289636834c
commit
262fafd00e
@ -7417,7 +7417,9 @@ retry:;
|
|||||||
if (!inside_txn) {
|
if (!inside_txn) {
|
||||||
if (!locked) {
|
if (!locked) {
|
||||||
int err;
|
int err;
|
||||||
|
#if MDBX_ENABLE_PGOP_STAT
|
||||||
unsigned wops = 0;
|
unsigned wops = 0;
|
||||||
|
#endif /* MDBX_ENABLE_PGOP_STAT */
|
||||||
/* pre-sync to avoid latency for writer */
|
/* pre-sync to avoid latency for writer */
|
||||||
if (unsynced_pages > /* FIXME: define threshold */ 16 &&
|
if (unsynced_pages > /* FIXME: define threshold */ 16 &&
|
||||||
(flags & MDBX_SAFE_NOSYNC) == 0) {
|
(flags & MDBX_SAFE_NOSYNC) == 0) {
|
||||||
@ -7446,8 +7448,10 @@ retry:;
|
|||||||
if (unlikely(err != MDBX_SUCCESS))
|
if (unlikely(err != MDBX_SUCCESS))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* pre-sync done */
|
#if MDBX_ENABLE_PGOP_STAT
|
||||||
wops = 1;
|
wops = 1;
|
||||||
|
#endif /* MDBX_ENABLE_PGOP_STAT */
|
||||||
|
/* pre-sync done */
|
||||||
rc = MDBX_SUCCESS /* means "some data was synced" */;
|
rc = MDBX_SUCCESS /* means "some data was synced" */;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user