Applied Frederik Himpe's patch to support -Werror=format-security.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@3173 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-02-18 22:56:48 +00:00
parent f4829edc94
commit ec69ff9f3f
7 changed files with 9 additions and 11 deletions

View File

@ -48,7 +48,7 @@ void GLDebugDrawer::draw3dText(const btVector3& location,const char* textString)
void GLDebugDrawer::reportErrorWarning(const char* warningString)
{
printf(warningString);
printf("%ws", warningString);
}
void GLDebugDrawer::drawContactPoint(const btVector3& pointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)

View File

@ -52,7 +52,7 @@ GrandPrixData::GrandPrixData(const std::string filename)
catch(std::exception& err)
{
fprintf(stderr, "Error while reading grandprix file '%s'\n", filename.c_str());
fprintf(stderr, err.what());
fprintf(stderr, "%s", err.what());
fprintf(stderr, "\n");
}

View File

@ -144,7 +144,7 @@ void HighscoreManager::Load()
{
fprintf(stderr, "Error while parsing highscore file '%s':\n",
m_filename.c_str());
fprintf(stderr, err.what());
fprintf(stderr, "%s", err.what());
fprintf(stderr, "\n");
fprintf(stderr, "No old highscores will be available.\n");
}
@ -182,8 +182,7 @@ void HighscoreManager::Save()
{
printf("Problems saving highscores in '%s'\n",
m_filename.c_str());
printf(e.what());
printf("\n");
puts(e.what());
m_can_write=false;
}
} // Save

View File

@ -117,8 +117,7 @@ void KartProperties::load(const std::string &filename, const std::string &node,
{
fprintf(stderr, "Error while parsing KartProperties '%s':\n",
filename.c_str());
fprintf(stderr, err.what());
fprintf(stderr, "\n");
fprintf(stderr, "%s\n", err.what());
}
delete root;

View File

@ -633,7 +633,7 @@ int main(int argc, char *argv[] )
} // try
catch (std::exception &e)
{
fprintf(stderr,e.what());
fprintf(stderr,"%s",e.what());
fprintf(stderr,"\nAborting SuperTuxKart\n");
}

View File

@ -58,7 +58,7 @@ void STKConfig::load(const std::string &filename)
{
fprintf(stderr, "Error while parsing KartProperties '%s':\n",
filename.c_str());
fprintf(stderr, err.what());
fprintf(stderr, "%s", err.what());
fprintf(stderr, "\n");
}
delete root;

View File

@ -510,7 +510,7 @@ void UserConfig::loadConfig(const std::string& filename)
catch(std::exception& e)
{
fprintf(stderr, "Error while parsing config '%s':\n", filename.c_str());
fprintf(stderr, e.what());
fprintf(stderr, "%s", e.what());
fprintf(stderr, "\n");
}
@ -782,7 +782,7 @@ void UserConfig::saveConfig(const std::string& filename)
catch(std::exception& e)
{
fprintf(stderr, "Couldn't write config: ");
fprintf(stderr, e.what());
fprintf(stderr, "%s",e.what());
fprintf(stderr, "\n");
}