From 5239bce5e57e2cbacd52f6070550709a078731fb Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 24 Aug 2016 11:52:10 +0300 Subject: [PATCH 1/5] mdbx: adds minor assert. More for ae92d0d6718fae4ec3dad237697fad709b3229c7. Change-Id: I32f8f54ec5888fe794b83d42ed7f5ae0138070d4 --- mdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mdb.c b/mdb.c index 4caa8c5f..6321e9a9 100644 --- a/mdb.c +++ b/mdb.c @@ -7303,6 +7303,7 @@ mdb_node_add(MDB_cursor *mc, indx_t indx, key ? key->mv_size : 0, key ? DKEY(key) : "null"); if (IS_LEAF2(mp)) { + mdb_cassert(mc, key); /* Move higher keys up one slot. */ int ksize = mc->mc_db->md_xsize, dif; char *ptr = LEAF2KEY(mp, indx, ksize); From b99cb20483b43d4a2ce5157b7ffe6b58bb4e1445 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 21 Aug 2016 23:20:22 +0200 Subject: [PATCH 2/5] mdbx: minor fix mdb_page_list() message. Change-Id: I25697a7123aef182762a91536e54ca118d6a0958 --- mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index 6321e9a9..deb4186a 100644 --- a/mdb.c +++ b/mdb.c @@ -1403,7 +1403,7 @@ mdb_page_list(MDB_page *mp) pgno, ((MDB_meta *)PAGEDATA(mp))->mm_txnid); return; default: - mdb_print("Bad page %zu flags 0x%u\n", pgno, mp->mp_flags); + mdb_print("Bad page %zu flags 0x%X\n", pgno, mp->mp_flags); return; } From 8a721f7feffb3b90b1da54c9f46d9232e1f554d2 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 25 Aug 2016 21:03:39 +0300 Subject: [PATCH 3/5] mdbx: fix 'clean' make-target typo. Change-Id: Ief422bd4ce3fa8800ad0f64702e93391cac5aa94 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9016fba9..630cf7d3 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ install: $(LIBRARIES) $(TOOLS) $(HEADERS) && cp -t $(SANDBOX)$(mandir)/man1 $(MANPAGES) clean: - rm -rf $(TOOLS )$(TESTS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov + rm -rf $(TOOLS) $(TESTS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov tests: $(TESTS) From 2500c766b7179238cdd97d8157c5479a71475169 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 25 Aug 2016 21:09:06 +0300 Subject: [PATCH 4/5] mdbx: fix CC and XCFLAGS in 'ci' make-target rules. Change-Id: I5a658fedd4e5a51c298a0b76e709b1f9cd28a261 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 630cf7d3..ee32259d 100644 --- a/Makefile +++ b/Makefile @@ -199,8 +199,9 @@ bench: bench-lmdb.txt bench-mdbx.txt endif ci-rule = ( CC=$$(which $1); if [ -n "$$CC" ]; then \ - CC=$$(readlink -f $$CC); echo -n "probe by $2 ($$CC): " && \ - $(MAKE) XCFLAGS="-UNDEBUG -DMDB_DEBUG=2" clean >$1.log 2>$1.err && $(MAKE) all check 1>$1.log 2>$1.err && echo "OK" \ + echo -n "probe by $2 ($$CC): " && \ + $(MAKE) clean >$1.log 2>$1.err && \ + $(MAKE) CC=$$(readlink -f $$CC) XCFLAGS="-UNDEBUG -DMDB_DEBUG=2" all check 1>$1.log 2>$1.err && echo "OK" \ || ( echo "FAILED"; cat $1.err >&2; exit 1 ); \ else echo "no $2 ($1) for probe"; fi; ) ci: From 796c4f5bc2308214820791e2d9877104a28d052b Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 25 Aug 2016 21:10:52 +0300 Subject: [PATCH 5/5] mdbx: fix usage of __attribute__((format(gnu_printf, ...)) for clang. Change-Id: Iaf3890a9c915f63896822f430b219bc107037540 --- mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index deb4186a..3612bdad 100644 --- a/mdb.c +++ b/mdb.c @@ -1223,7 +1223,7 @@ static txnid_t mdbx_oomkick(MDB_env *env, txnid_t oldest); #endif /* MDBX_MODE_ENABLED */ static void mdb_debug_log(int type, const char *function, int line, const char *fmt, ...) - __attribute__((format(gnu_printf, 4, 5))); + __attribute__((format(printf, 4, 5))); #if MDB_DEBUG static txnid_t mdb_debug_edge;