WAR for cppcheck 1.61 segfault, fix cppcheck warning about unused function