From 2f13288a23da4dfaf6c40e1e943f83d8fa43145a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 14 Jul 2016 11:45:11 +0200 Subject: Fix sme warnings... --- src/tests/ktests/btree2/test.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/tests/ktests') diff --git a/src/tests/ktests/btree2/test.c b/src/tests/ktests/btree2/test.c index dd62237..f139363 100644 --- a/src/tests/ktests/btree2/test.c +++ b/src/tests/ktests/btree2/test.c @@ -36,8 +36,15 @@ void test_btree_2() { if (k[i] <= xk && (ilower == -1 || k[i] > k[ilower])) ilower = i; if (k[i] >= xk && (iupper == -1 || k[i] < k[iupper])) iupper = i; } - dbg_printf("random %d : lower %d (= %d), upper %d (= %d) ; ", - xk, k[ilower], v[ilower], k[iupper], v[iupper]); + dbg_printf("random %d : ", xk); + if (ilower == -1) + dbg_printf("no lower, "); + else + dbg_printf("lower %d (= %d), ", k[ilower], v[ilower]); + if (iupper == -1) + dbg_printf("no upper ; "); + else + dbg_printf("upper %d (= %d) ; ", k[iupper], v[iupper]); const uint32_t bt_lower = (uint32_t)btree_lower(ht, (void*)xk, 0); const uint32_t bt_upper = (uint32_t)btree_upper(ht, (void*)xk, 0); dbg_printf("got lower %d, upper %d\n", bt_lower, bt_upper); -- cgit v1.2.3