Disable MSVC warnings

This commit is contained in:
Stas Degteff
2005-08-29 20:00:54 +00:00
parent 1f2fc4b132
commit 87a4e6f763
5 changed files with 26 additions and 7 deletions

View File

@@ -541,7 +541,7 @@ static bool SwitchLanguage(word crc, char* str) {
}
return 0;
} else
return -1;
return bool(-1);
}
@@ -577,7 +577,7 @@ void LangInit() {
LNG = (LangGed*)throw_calloc(1, sizeof(LangGed));
LNG->Outofmem = throw_strdup("Out of memory!");
// Init LangCrc pointers to LNG
char** lptr = (char**)LNG;
for(LangCrc* lngptr = LangCrcs; lngptr->crc != CRC_LAST_CRC; lngptr++, lptr++)
@@ -698,7 +698,7 @@ bool ReadLangCfg(int force) {
char buf[1024];
LangCrc* lngptr;
int line = 0;
// Read the GOLDLANG.CFG if there is one
const char* cfgname = AddPath(CFG->goldpath, CFG->langcfg);
fpi = fsopen(cfgname, "rt", CFG->sharemode);
@@ -748,7 +748,7 @@ bool ReadLangCfg(int force) {
}
AssignDateNames();
return true;
}

View File

@@ -27,6 +27,13 @@
#if defined(__MINGW32__) || defined(_MSC_VER)
#include <malloc.h>
#endif
#if defined(_MSC_VER) && defined(_DEBUG)
/* C4786: 'identifier' : identifier was truncated to 'number'
characters in the debug information
*/
#pragma warning(disable: 4786)
#endif
#include <algorithm>
#include <golded.h>

View File

@@ -24,6 +24,12 @@
// Template handling.
// ------------------------------------------------------------------
#if defined(_MSC_VER) && defined(_DEBUG)
/* C4786: 'identifier' : identifier was truncated to 'number'
characters in the debug information
*/
#pragma warning(disable: 4786)
#endif
#include <algorithm>
#include <golded.h>