diff options
author | Arnaud Boutonné | 2010-08-15 23:37:56 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-08-15 23:37:56 +0000 |
commit | 58987824c2846f127ced4902ab37098e34662b20 (patch) | |
tree | ab3bb49dabfc4a848af887205531d6f6916f41e9 /engines | |
parent | b49761b6eae3a0aadefef4c4ffee6a7b583cc3ac (diff) | |
download | scummvm-rg350-58987824c2846f127ced4902ab37098e34662b20.tar.gz scummvm-rg350-58987824c2846f127ced4902ab37098e34662b20.tar.bz2 scummvm-rg350-58987824c2846f127ced4902ab37098e34662b20.zip |
Gob - Follow cppcheck advices
svn-id: r52106
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/expression.cpp | 2 | ||||
-rw-r--r-- | engines/gob/util.cpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/engines/gob/expression.cpp b/engines/gob/expression.cpp index 9652862b2f..d053345b4c 100644 --- a/engines/gob/expression.cpp +++ b/engines/gob/expression.cpp @@ -1002,7 +1002,6 @@ int16 Expression::parseExpr(byte stopToken, byte *type) { Stack stack; StackFrame stackFrame(stack); byte operation; - bool escape; int16 brackStart; uint32 varBase; @@ -1037,7 +1036,6 @@ int16 Expression::parseExpr(byte stopToken, byte *type) { if ((operation == stopToken) || (operation == OP_OR) || (operation == OP_AND) || (operation == OP_END_EXPR)) { while (stackFrame.pos >= 2) { - escape = false; if ((stackFrame.opers[-2] == OP_BEGIN_EXPR) && ((operation == OP_END_EXPR) || (operation == stopToken))) { stackFrame.opers[-2] = stackFrame.opers[-1]; diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 26899232e2..c895c6301d 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -435,7 +435,7 @@ void Util::cleanupStr(char *str) { cutFromStr(str, 0, 1); // Trim spaces right - while ((strlen(str) > 0) && (str[strlen(str) - 1] == ' ')) + while ((*str != '\0') && (str[strlen(str) - 1] == ' ')) cutFromStr(str, strlen(str) - 1, 1); // Merge double spaces |