Fix warning about unused function by declaring it ahead of time