From 904c1b4d699aeb1ce170f0cd996a01d2d06812e3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 10 Sep 2021 20:11:46 -0400 Subject: Add nullability annotations This allows clang to issue warnings at compile time when null is passed to a non-null parameter. For public entry points, also add assertions to catch such issues when the compiler does not support this. --- benchmark/tree_bench.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmark') diff --git a/benchmark/tree_bench.c b/benchmark/tree_bench.c index 72f1926..6e573ee 100644 --- a/benchmark/tree_bench.c +++ b/benchmark/tree_bench.c @@ -198,8 +198,9 @@ bench_zix_btree(size_t n_elems, for (size_t i = 0; i < n_elems; i++) { r = unique_rand(i); - void* removed = NULL; - if (zix_btree_remove(t, (void*)r, &removed, NULL)) { + void* removed = NULL; + ZixBTreeIter next = zix_btree_end(t); + if (zix_btree_remove(t, (void*)r, &removed, &next)) { return test_fail("Failed to remove %" PRIuPTR "\n", r); } } -- cgit v1.2.1