aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-06-21 19:32:25 +0000
committerTorbjörn Andersson2010-06-21 19:32:25 +0000
commit38b172e8e5339c867fe66c69d9ef70d26c20ebf3 (patch)
treecf36d853aa3fee563dba0e25c7be650d349d76f1 /common
parent0ab7a16e452f5244d37dc0426f62b5b05d12f032 (diff)
downloadscummvm-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
Diffstat (limited to 'common')
-rw-r--r--common/macresman.cpp10
-rw-r--r--common/translation.cpp3
2 files changed, 4 insertions, 9 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
}