[guilib] Cleanup things found by Cppcheck