From 38b172e8e5339c867fe66c69d9ef70d26c20ebf3 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 21 Jun 2010 19:32:25 +0000 Subject: Fixed some Cppcheck warnings. (There are plenty left, if anyone's wondering.) svn-id: r50120 --- common/macresman.cpp | 10 +++------- common/translation.cpp | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'common') 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 } -- cgit v1.2.3