summaryrefslogtreecommitdiffstats
path: root/benchmark/tree_bench.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 20:11:46 -0400
committerDavid Robillard <d@drobilla.net>2021-09-10 20:54:28 -0400
commit904c1b4d699aeb1ce170f0cd996a01d2d06812e3 (patch)
tree35a4a9f75a395a958ab0ea5fffeca81ce733bbc1 /benchmark/tree_bench.c
parent1f8c8118f2d42f495dbe6e3adb2a95c87a92e8e0 (diff)
downloadzix-904c1b4d699aeb1ce170f0cd996a01d2d06812e3.tar.gz
zix-904c1b4d699aeb1ce170f0cd996a01d2d06812e3.tar.bz2
zix-904c1b4d699aeb1ce170f0cd996a01d2d06812e3.zip
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.
Diffstat (limited to 'benchmark/tree_bench.c')
-rw-r--r--benchmark/tree_bench.c5
1 files changed, 3 insertions, 2 deletions
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);
}
}