- added coverity linux script

- a few updates to fix coverity reported issues
This commit is contained in:
SoftCoder 2013-12-17 23:57:45 -08:00
parent 42ea7a5826
commit 606aa392c7
3 changed files with 10 additions and 7 deletions

View File

@ -1816,16 +1816,14 @@ void MenuStateCustomGame::PlayNow(bool saveGame) {
mainMessageBoxState=1;
Lang &lang= Lang::getInstance();
char szMsg[1024]="";
strcpy(szMsg,lang.getString("NetworkSlotNoHumanErrorUI","",true).c_str());
showMessageBox(szMsg, "", false);
string sMsg = lang.getString("NetworkSlotNoHumanErrorUI","",true);
showMessageBox(sMsg, "", false);
const vector<string> languageList = serverInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
for(unsigned int j = 0; j < languageList.size(); ++j) {
char szMsg[1024]="";
strcpy(szMsg,lang.getString("NetworkSlotNoHumanError","",true).c_str());
sMsg = lang.getString("NetworkSlotNoHumanError","",true);
serverInterface->sendTextMessage(szMsg,-1, true,languageList[j]);
serverInterface->sendTextMessage(sMsg,-1, true,languageList[j]);
}
safeMutex.ReleaseLock();

View File

@ -191,6 +191,8 @@ int zipfile_tool(int argc, const char *argv[]) {
}
else if (status != Z_OK) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflate() failed with status %i!\n", status);
if(pInfile) fclose(pInfile);
if(pOutfile) fclose(pOutfile);
return EXIT_FAILURE;
}
}
@ -207,6 +209,7 @@ int zipfile_tool(int argc, const char *argv[]) {
if (inflateInit(&stream)) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflateInit() failed!\n");
if(pInfile) fclose(pInfile);
if(pOutfile) fclose(pOutfile);
return EXIT_FAILURE;
}
@ -218,6 +221,7 @@ int zipfile_tool(int argc, const char *argv[]) {
if (fread(s_inbuf, 1, n, pInfile) != n) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed reading from input file!\n");
if(pInfile) fclose(pInfile);
if(pOutfile) fclose(pOutfile);
return EXIT_FAILURE;
}
@ -246,6 +250,7 @@ int zipfile_tool(int argc, const char *argv[]) {
}
else if (status != Z_OK) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflate() failed with status %i!\n", status);
if(pInfile) fclose(pInfile);
if(pOutfile) fclose(pOutfile);
return EXIT_FAILURE;
}

View File

@ -185,7 +185,7 @@ int g3d2xml(FILE *infile, FILE *outfile)
printf("Could not read mesh header!\n");
return FALSE;
}
meshHeader.name[NAMESIZE-1] = 0;
/* write out XML mesh header */
fprintf(outfile, "\t<Mesh name=\"%s\" ", meshHeader.name);
fprintf(outfile, "frameCount=\"%u\" ", meshHeader.frameCount);