Closed jpswinski closed 5 years ago
Ran on dd1463a701ed55c210153cd53e7e91e76e56eae3
Analysis of try_insert_rebalance function in rb_tree.c shows that the calls in question by scan-build (the rotate_right and rotate_left at the bottom of the function) are safe to make since logic that precedes them guarantees that the N,P,G relationship is in essence a straight line which means that the left node for rotating right and the right node for rotating left is always P which is not null.
An assert was added to both functions to pass the scan-build.
87a65ba7cbc8566155fce40bc7b7effc327fee82
$ scan-build make COMPILER=clang TOOLCHAIN=llvm