nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit cd0f26ae81e845e405fb2f12ba50110b1a8aa252
parent 46028086d19af707d05155baa25e0fd199df33cc
Author: William Casarin <jb55@jb55.com>
Date:   Thu,  4 Apr 2024 21:03:26 +0100

build: fix compile warning

A small size_t/uint64 conversion issue

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/nostrdb.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -2719,7 +2719,8 @@ static int ndb_query_plan_execute_created_at(struct ndb_txn *txn, int rc; struct ndb_note *note; struct ndb_tsid key, *pkey; - uint64_t *pint, until, since, note_id, note_size; + uint64_t *pint, until, since, note_id; + size_t note_size; struct ndb_query_result res; unsigned char high_key[32] = {0xFF}; @@ -2763,7 +2764,7 @@ static int ndb_query_plan_execute_created_at(struct ndb_txn *txn, if (pkey->timestamp < since) break; - ndb_query_result_init(&res, note, note_size, note_id); + ndb_query_result_init(&res, note, (uint64_t)note_size, note_id); if (!push_query_result(results, &res)) break; next: