mirror of
https://github.com/glest/glest-source.git
synced 2025-08-25 17:20:43 +02:00
- added coverity linux script
- a few updates to fix coverity reported issues
This commit is contained in:
@@ -1816,16 +1816,14 @@ void MenuStateCustomGame::PlayNow(bool saveGame) {
|
|||||||
mainMessageBoxState=1;
|
mainMessageBoxState=1;
|
||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
Lang &lang= Lang::getInstance();
|
||||||
char szMsg[1024]="";
|
string sMsg = lang.getString("NetworkSlotNoHumanErrorUI","",true);
|
||||||
strcpy(szMsg,lang.getString("NetworkSlotNoHumanErrorUI","",true).c_str());
|
showMessageBox(sMsg, "", false);
|
||||||
showMessageBox(szMsg, "", false);
|
|
||||||
|
|
||||||
const vector<string> languageList = serverInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
const vector<string> languageList = serverInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
||||||
for(unsigned int j = 0; j < languageList.size(); ++j) {
|
for(unsigned int j = 0; j < languageList.size(); ++j) {
|
||||||
char szMsg[1024]="";
|
sMsg = lang.getString("NetworkSlotNoHumanError","",true);
|
||||||
strcpy(szMsg,lang.getString("NetworkSlotNoHumanError","",true).c_str());
|
|
||||||
|
|
||||||
serverInterface->sendTextMessage(szMsg,-1, true,languageList[j]);
|
serverInterface->sendTextMessage(sMsg,-1, true,languageList[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
|
@@ -191,6 +191,8 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||||||
}
|
}
|
||||||
else if (status != Z_OK) {
|
else if (status != Z_OK) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflate() failed with status %i!\n", status);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("deflate() failed with status %i!\n", status);
|
||||||
|
if(pInfile) fclose(pInfile);
|
||||||
|
if(pOutfile) fclose(pOutfile);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -207,6 +209,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||||||
if (inflateInit(&stream)) {
|
if (inflateInit(&stream)) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflateInit() failed!\n");
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflateInit() failed!\n");
|
||||||
if(pInfile) fclose(pInfile);
|
if(pInfile) fclose(pInfile);
|
||||||
|
if(pOutfile) fclose(pOutfile);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,6 +221,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||||||
|
|
||||||
if (fread(s_inbuf, 1, n, pInfile) != n) {
|
if (fread(s_inbuf, 1, n, pInfile) != n) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed reading from input file!\n");
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed reading from input file!\n");
|
||||||
|
if(pInfile) fclose(pInfile);
|
||||||
if(pOutfile) fclose(pOutfile);
|
if(pOutfile) fclose(pOutfile);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -246,6 +250,7 @@ int zipfile_tool(int argc, const char *argv[]) {
|
|||||||
}
|
}
|
||||||
else if (status != Z_OK) {
|
else if (status != Z_OK) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflate() failed with status %i!\n", status);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("inflate() failed with status %i!\n", status);
|
||||||
|
if(pInfile) fclose(pInfile);
|
||||||
if(pOutfile) fclose(pOutfile);
|
if(pOutfile) fclose(pOutfile);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
@@ -185,7 +185,7 @@ int g3d2xml(FILE *infile, FILE *outfile)
|
|||||||
printf("Could not read mesh header!\n");
|
printf("Could not read mesh header!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
meshHeader.name[NAMESIZE-1] = 0;
|
||||||
/* write out XML mesh header */
|
/* write out XML mesh header */
|
||||||
fprintf(outfile, "\t<Mesh name=\"%s\" ", meshHeader.name);
|
fprintf(outfile, "\t<Mesh name=\"%s\" ", meshHeader.name);
|
||||||
fprintf(outfile, "frameCount=\"%u\" ", meshHeader.frameCount);
|
fprintf(outfile, "frameCount=\"%u\" ", meshHeader.frameCount);
|
||||||
|
Reference in New Issue
Block a user