Fix print token/argument mismatches and other cppcheck fixes