Remove unused function to fix clang -Werror build