From cfb29dcb5199922e40e08b7cdc6502478782006c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Nov 2006 15:50:30 +0000 Subject: Fix MSVC2005 warnings. Please, review the changes. svn-id: r24760 --- common/stdafx.h | 1 + engines/agos/contain.cpp | 2 +- engines/agos/menus.cpp | 2 +- engines/agos/vga_s1.cpp | 4 ++-- engines/cine/part.cpp | 2 +- engines/gob/gob.cpp | 2 +- engines/gob/inter_v2.cpp | 2 +- engines/scumm/he/intern_he.h | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/stdafx.h b/common/stdafx.h index 4c32e3cb02..3ae85686a2 100644 --- a/common/stdafx.h +++ b/common/stdafx.h @@ -51,6 +51,7 @@ #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 : 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 #pragma warning( disable : 4702 ) // turn off "unreachable code" warning diff --git a/engines/agos/contain.cpp b/engines/agos/contain.cpp index 0362580e11..4b02017bea 100644 --- a/engines/agos/contain.cpp +++ b/engines/agos/contain.cpp @@ -34,7 +34,7 @@ int AGOSEngine::canPlace(Item *x, Item *y) { if (getGameType() == GType_ELVIRA1) { SubPlayer *p = (SubPlayer *)findChildOfType(y, 3); SubContainer *c = (SubContainer *)findChildOfType(y, 7); - int cap; + int cap = 0; int wt; if ((c == NULL) && (p == NULL)) diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp index ff86a05724..45aab9ee7b 100644 --- a/engines/agos/menus.cpp +++ b/engines/agos/menus.cpp @@ -128,7 +128,7 @@ void AGOSEngine::lightMenuStrip(int a) { unlightMenuStrip(); for (int i = 120; i != 130; i++) { - if (a & (1 << i - 120)) { + if (a & ((1 << i) - 120)) { enableBox(i); lightMenuBox(i); } diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp index fb3a80f1e9..c467ca7632 100644 --- a/engines/agos/vga_s1.cpp +++ b/engines/agos/vga_s1.cpp @@ -60,8 +60,8 @@ void AGOSEngine::vc17_setPathfinderItem() { } void AGOSEngine::vc22_setPaletteNew() { - byte *offs, *palptr, *src; - uint16 a = 0, b, num, palSize; + byte *offs, *palptr = 0, *src; + uint16 a = 0, b, num = 1, palSize = 0; a = vcReadNextWord(); b = vcReadNextWord(); diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index cc43b9c70d..7eb05ff22d 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -336,7 +336,7 @@ int16 findFileInBundle(const char *fileName) { } } - const char **bPtr; + const char **bPtr = 0; if (g_cine->getPlatform() == Common::kPlatformPC) { switch (g_cine->getLanguage()) { diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 87d9633563..f222414ae1 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -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) { int32 sSize; int32 retSize; - int16 index; + int16 index = 0; int16 y; char *buf; char *sName; diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 0d05f659dd..7d01d4b145 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1332,7 +1332,7 @@ bool Inter_v2::o2_readData(char &cmdCount, int16 &counter, int16 &retFlag) { int32 offset; int16 dataVar; // si int16 handle; - int16 index; + int16 index = 0; int16 y; char *buf; bool readPal; diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index 336e0731af..a1998c19e2 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -42,7 +42,7 @@ class ResExtractor; class LogicHE; class MoviePlayer; class Sprite; -class CUP_Player; +struct CUP_Player; #endif class ScummEngine_v60he : public ScummEngine_v6 { -- cgit v1.2.3