Fix some errors found by tcc

Also remove an unused function.
We can note that the function is unused, but there are likely future cases in which this function would be used, and I want to make sure that we call this function in those cases rather than calling SplitMonotonicAtFlex with the extra argument.