diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index 6f9e86c2d52..4c949183e01 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 8f6075fb6ca..dfa01bf29da 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 732b69d4eae..633754ef9cb 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);