From 8505203080405de54506c20c91ad7cec988ecd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 12 Oct 2022 13:58:25 +0300 Subject: [PATCH] mdbx: avoid `-Wint-to-pointer-cast` warnings while casting to `mdbx_tid_t` (backport). --- src/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index a2211ad0..71dee172 100644 --- a/src/core.c +++ b/src/core.c @@ -20997,8 +20997,8 @@ __cold int mdbx_reader_list(const MDBX_env *env, MDBX_reader_list_func *func, reader_pages_retired)) : 0; } - rc = func(ctx, ++serial, i, pid, (mdbx_tid_t)tid, txnid, lag, bytes_used, - bytes_retained); + rc = func(ctx, ++serial, i, pid, (mdbx_tid_t)((intptr_t)tid), txnid, lag, + bytes_used, bytes_retained); if (unlikely(rc != MDBX_SUCCESS)) break; } @@ -21250,7 +21250,7 @@ __cold static txnid_t mdbx_kick_longlived_readers(MDBX_env *env, ? pgno2bytes(env, (pgno_t)(head_retired - oldest_retired)) : 0; int rc = env->me_hsr_callback( - env, env->me_txn, pid, (mdbx_tid_t)tid, laggard, + env, env->me_txn, pid, (mdbx_tid_t)((intptr_t)tid), laggard, (gap < UINT_MAX) ? (unsigned)gap : UINT_MAX, space, retry); if (rc < 0) break;