diff options
author | Strangerke | 2015-05-09 09:42:16 +0200 |
---|---|---|
committer | Strangerke | 2015-05-09 09:42:16 +0200 |
commit | 8d89bf9bc6c067af4deaf86d4ae8c3430d584851 (patch) | |
tree | f136c54db6ef46d25ca207dc42a38e45f34fc520 | |
parent | 4c7e840388afb4c573d9740614b75883688c55ec (diff) | |
download | scummvm-rg350-8d89bf9bc6c067af4deaf86d4ae8c3430d584851.tar.gz scummvm-rg350-8d89bf9bc6c067af4deaf86d4ae8c3430d584851.tar.bz2 scummvm-rg350-8d89bf9bc6c067af4deaf86d4ae8c3430d584851.zip |
SHERLOCK: Fix some more GCC warnings
-rw-r--r-- | engines/sherlock/journal.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/resources.cpp | 14 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 0c8864c302..5ecb5ae26c 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -290,10 +290,10 @@ int Journal::loadJournalFile(bool alreadyLoaded) { journalString += NAMES[talk._talkTo]; const byte *strP = replyP + 1; - char v; + byte v; do { v = *strP++; - } while (v && v < 128 && v != '.' && v != '!' && v != '?'); + } while (v && (v < 128) && (v != '.') && (v != '!') && (v != '?')); if (v == '?') journalString += " asked, \""; diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp index 715ca492ae..c64f4e4923 100644 --- a/engines/sherlock/resources.cpp +++ b/engines/sherlock/resources.cpp @@ -343,9 +343,9 @@ void ImageFile::loadPalette(Common::SeekableReadStream &stream) { int v2 = stream.readUint16LE() + 1; stream.skip(1); // Skip paletteBase byte bool rleEncoded = stream.readByte() == 1; - int size = v1 * v2; + int palSize = v1 * v2; - if ((size - 12) == PALETTE_SIZE && !rleEncoded) { + if ((palSize - 12) == PALETTE_SIZE && !rleEncoded) { // Found palette, so read it in stream.seek(2 + 12, SEEK_CUR); for (int idx = 0; idx < PALETTE_SIZE; ++idx) @@ -373,21 +373,21 @@ void ImageFile::decompressFrame(ImageFrame &frame, const byte *src) { // RLE encoded byte *dst = (byte *)frame._frame.getPixels(); - int size = frame._width * frame._height; - while (size > 0) { + int frameSize = frame._width * frame._height; + while (frameSize > 0) { if (*src == frame._rleMarker) { byte rleColor = src[1]; byte rleCount = src[2]; src += 3; - size -= rleCount; + frameSize -= rleCount; while (rleCount--) *dst++ = rleColor; } else { *dst++ = *src++; - --size; + --frameSize; } } - assert(size == 0); + assert(frameSize == 0); } else { // Uncompressed frame Common::copy(src, src + frame._width * frame._height, diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index 6ba6b33340..4cd613d48f 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -485,7 +485,7 @@ void ScalpelEngine::loadInventory() { inv.push_back(InventoryItem(544, "Tarot", "Tarot Cards", "_ITEM71A")); inv.push_back(InventoryItem(544, "Ornate Key", "An ornate key", "_ITEM70A")); inv.push_back(InventoryItem(586, "Pawn ticket", "A pawn ticket", "_ITEM16A")); -}; +} /** * Transition to show an image |