diff options
author | Max Horn | 2009-04-27 14:40:14 +0000 |
---|---|---|
committer | Max Horn | 2009-04-27 14:40:14 +0000 |
commit | f177c7142c996fbeed564fe06316f5bc6f6b6914 (patch) | |
tree | 1ef16ca83085dae5deeb3ce323c4f02c1043e461 | |
parent | 7f20f3bb3e30c9b9cb78ea1f9033677d30c00a04 (diff) | |
download | scummvm-rg350-f177c7142c996fbeed564fe06316f5bc6f6b6914.tar.gz scummvm-rg350-f177c7142c996fbeed564fe06316f5bc6f6b6914.tar.bz2 scummvm-rg350-f177c7142c996fbeed564fe06316f5bc6f6b6914.zip |
Fixed some silly warnings
svn-id: r40165
-rw-r--r-- | engines/gob/parse.cpp | 2 | ||||
-rw-r--r-- | engines/gob/parse_v2.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/intmap.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index 6f9e86c2d5..4c949183e0 100644 --- a/engines/gob/parse.cpp +++ b/engines/gob/parse.cpp @@ -458,7 +458,7 @@ void Parse::printVarIndex() { int Parse::cmpHelper(byte *operPtr, int32 *valPtr) { byte var_C = operPtr[-3]; - int cmpTemp; + int cmpTemp = 0; if (var_C == OP_LOAD_IMM_INT16) { cmpTemp = (int)valPtr[-3] - (int)valPtr[-1]; } else if (var_C == OP_LOAD_IMM_STR) { diff --git a/engines/gob/parse_v2.cpp b/engines/gob/parse_v2.cpp index 8f6075fb6c..dfa01bf29d 100644 --- a/engines/gob/parse_v2.cpp +++ b/engines/gob/parse_v2.cpp @@ -797,8 +797,6 @@ int16 Parse_v2::parseExpr(byte stopToken, byte *arg_2) { if ((operStack[brackStart] >= OP_OR) || (operStack[brackStart] == OP_BEGIN_EXPR)) brackStart++; - int cmpTemp; - switch (operPtr[-2]) { case OP_ADD: if (operStack[brackStart] == OP_LOAD_IMM_INT16) { @@ -913,7 +911,9 @@ int16 Parse_v2::parseExpr(byte stopToken, byte *arg_2) { valPtr -= 2; break; - case OP_NEQ: + case OP_NEQ: { + int cmpTemp = 0; + if (operPtr[-3] == OP_LOAD_IMM_INT16) { cmpTemp = valPtr[-3] - valPtr[-1]; } else if (operPtr[-3] == OP_LOAD_IMM_STR) { @@ -930,6 +930,7 @@ int16 Parse_v2::parseExpr(byte stopToken, byte *arg_2) { operPtr -= 2; valPtr -= 2; break; + } default: var_1A = true; diff --git a/engines/sci/engine/intmap.cpp b/engines/sci/engine/intmap.cpp index 732b69d4ea..633754ef9c 100644 --- a/engines/sci/engine/intmap.cpp +++ b/engines/sci/engine/intmap.cpp @@ -111,7 +111,7 @@ int IntMapper::lookupKey(int key) const { void IntMapper::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(base_value); if (s.isLoading()) { - uint32 key, idx; + uint32 key = 0, idx = 0; clear(); while (true) { s.syncAsSint32LE(key); |