Fix MSVC2005 warnings. Please, review the changes.

svn-id: r24760
This commit is contained in:
Eugene Sandulenko 2006-11-22 15:50:30 +00:00
parent 1076ae02ea
commit cfb29dcb51
8 changed files with 9 additions and 8 deletions

View file

@ -51,6 +51,7 @@
#pragma warning( disable : 4511 ) // turn off "copy constructor could not be generated" warning #pragma warning( disable : 4511 ) // turn off "copy constructor could not be generated" warning
#pragma warning( disable : 4512 ) // turn off "assignment operator could not be generated" warning #pragma warning( disable : 4512 ) // turn off "assignment operator could not be generated" warning
#pragma warning( disable : 4351 ) // turn off "new behavior ... will be default initialized" warning #pragma warning( disable : 4351 ) // turn off "new behavior ... will be default initialized" warning
#pragma warning( disable : 4505 ) // turn off "unreferenced local function has been removed"
// FIXME: 4702 & 4706 - may be enabled // FIXME: 4702 & 4706 - may be enabled
#pragma warning( disable : 4702 ) // turn off "unreachable code" warning #pragma warning( disable : 4702 ) // turn off "unreachable code" warning

View file

@ -34,7 +34,7 @@ int AGOSEngine::canPlace(Item *x, Item *y) {
if (getGameType() == GType_ELVIRA1) { if (getGameType() == GType_ELVIRA1) {
SubPlayer *p = (SubPlayer *)findChildOfType(y, 3); SubPlayer *p = (SubPlayer *)findChildOfType(y, 3);
SubContainer *c = (SubContainer *)findChildOfType(y, 7); SubContainer *c = (SubContainer *)findChildOfType(y, 7);
int cap; int cap = 0;
int wt; int wt;
if ((c == NULL) && (p == NULL)) if ((c == NULL) && (p == NULL))

View file

@ -128,7 +128,7 @@ void AGOSEngine::lightMenuStrip(int a) {
unlightMenuStrip(); unlightMenuStrip();
for (int i = 120; i != 130; i++) { for (int i = 120; i != 130; i++) {
if (a & (1 << i - 120)) { if (a & ((1 << i) - 120)) {
enableBox(i); enableBox(i);
lightMenuBox(i); lightMenuBox(i);
} }

View file

@ -60,8 +60,8 @@ void AGOSEngine::vc17_setPathfinderItem() {
} }
void AGOSEngine::vc22_setPaletteNew() { void AGOSEngine::vc22_setPaletteNew() {
byte *offs, *palptr, *src; byte *offs, *palptr = 0, *src;
uint16 a = 0, b, num, palSize; uint16 a = 0, b, num = 1, palSize = 0;
a = vcReadNextWord(); a = vcReadNextWord();
b = vcReadNextWord(); b = vcReadNextWord();

View file

@ -336,7 +336,7 @@ int16 findFileInBundle(const char *fileName) {
} }
} }
const char **bPtr; const char **bPtr = 0;
if (g_cine->getPlatform() == Common::kPlatformPC) { if (g_cine->getPlatform() == Common::kPlatformPC) {
switch (g_cine->getLanguage()) { switch (g_cine->getLanguage()) {

View file

@ -368,7 +368,7 @@ void GobEngine::saveGame(enum SaveFiles sFile, int16 dataVar, int32 size, int32
void GobEngine::loadGame(enum SaveFiles sFile, int16 dataVar, int32 size, int32 offset) { void GobEngine::loadGame(enum SaveFiles sFile, int16 dataVar, int32 size, int32 offset) {
int32 sSize; int32 sSize;
int32 retSize; int32 retSize;
int16 index; int16 index = 0;
int16 y; int16 y;
char *buf; char *buf;
char *sName; char *sName;

View file

@ -1332,7 +1332,7 @@ bool Inter_v2::o2_readData(char &cmdCount, int16 &counter, int16 &retFlag) {
int32 offset; int32 offset;
int16 dataVar; // si int16 dataVar; // si
int16 handle; int16 handle;
int16 index; int16 index = 0;
int16 y; int16 y;
char *buf; char *buf;
bool readPal; bool readPal;

View file

@ -42,7 +42,7 @@ class ResExtractor;
class LogicHE; class LogicHE;
class MoviePlayer; class MoviePlayer;
class Sprite; class Sprite;
class CUP_Player; struct CUP_Player;
#endif #endif
class ScummEngine_v60he : public ScummEngine_v6 { class ScummEngine_v60he : public ScummEngine_v6 {