diff options
author | Torbjörn Andersson | 2010-06-21 19:32:25 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-06-21 19:32:25 +0000 |
commit | 38b172e8e5339c867fe66c69d9ef70d26c20ebf3 (patch) | |
tree | cf36d853aa3fee563dba0e25c7be650d349d76f1 | |
parent | 0ab7a16e452f5244d37dc0426f62b5b05d12f032 (diff) | |
download | scummvm-rg350-38b172e8e5339c867fe66c69d9ef70d26c20ebf3.tar.gz scummvm-rg350-38b172e8e5339c867fe66c69d9ef70d26c20ebf3.tar.bz2 scummvm-rg350-38b172e8e5339c867fe66c69d9ef70d26c20ebf3.zip |
Fixed some Cppcheck warnings. (There are plenty left, if anyone's wondering.)
svn-id: r50120
-rw-r--r-- | common/macresman.cpp | 10 | ||||
-rw-r--r-- | common/translation.cpp | 3 | ||||
-rw-r--r-- | engines/cruise/decompiler.cpp | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp index 6a6a818083..df7351d55a 100644 --- a/common/macresman.cpp +++ b/common/macresman.cpp @@ -525,12 +525,10 @@ void MacResManager::convertCrsrCursor(byte *data, int datasize, byte **cursor, i int i, b; byte imageByte; byte *iconData; - int numBytes; int pixelsPerByte, bpp; int ctSize; byte bitmask; int iconRowBytes, iconBounds[4]; - int ignored; int iconDataSize; dis.readUint16BE(); // type @@ -616,21 +614,19 @@ void MacResManager::convertCrsrCursor(byte *data, int datasize, byte **cursor, i dis.readUint16BE(); // colorID[c] palette[0][c * 4 + 0] = dis.readByte(); - ignored = dis.readByte(); + dis.readByte(); palette[0][c * 4 + 1] = dis.readByte(); - ignored = dis.readByte(); + dis.readByte(); palette[0][c * 4 + 2] = dis.readByte(); - ignored = dis.readByte(); + dis.readByte(); palette[0][c * 4 + 3] = 0; } *palSize = ctSize; - numBytes = (iconBounds[2] - iconBounds[0]) * (iconBounds[3] - iconBounds[1]); - pixelsPerByte = (iconBounds[2] - iconBounds[0]) / iconRowBytes; bpp = 8 / pixelsPerByte; diff --git a/common/translation.cpp b/common/translation.cpp index 1d8295f5a2..bb86b3b7ac 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -90,8 +90,7 @@ TranslationManager::TranslationManager() { TranslationManager::~TranslationManager() { #ifdef USE_TERMCONV iconv_close(_conversion); - if (_convmsg) - delete[] _convmsg; + delete[] _convmsg; #endif // USE_TERMCONV } diff --git a/engines/cruise/decompiler.cpp b/engines/cruise/decompiler.cpp index ba4ade56a7..31d9dcef9b 100644 --- a/engines/cruise/decompiler.cpp +++ b/engines/cruise/decompiler.cpp @@ -760,8 +760,6 @@ int decompFunction() { char *var1; char *objIdxStr; char *ovlStr; - char varName[256]; - int i; var1 = popDecomp(); objIdxStr = popDecomp(); |