[Scummvm-git-logs] scummvm master -> ce744add1f77f11030619324132caf2b5b865e37
orgads
noreply at scummvm.org
Tue May 13 20:15:03 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ce744add1f JANITORIAL: Fix unused variable warnings on release build
Commit: ce744add1f77f11030619324132caf2b5b865e37
https://github.com/scummvm/scummvm/commit/ce744add1f77f11030619324132caf2b5b865e37
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2025-05-13T22:33:16+03:00
Commit Message:
JANITORIAL: Fix unused variable warnings on release build
Changed paths:
audio/decoders/flac.cpp
common/span.h
engines/advancedDetector.h
engines/alg/game.cpp
engines/alg/logic/game_bountyhunter.cpp
engines/alg/video.cpp
engines/glk/blorb.cpp
engines/gob/script.cpp
engines/gob/variables.cpp
engines/grim/emi/sound/codecs/scx.cpp
engines/grim/movie/codecs/smush_decoder.cpp
engines/sci/engine/kstring.cpp
engines/sci/graphics/view.cpp
engines/sci/resource/resource.cpp
engines/sci/sound/drivers/midi.cpp
engines/scumm/boxes.cpp
engines/scumm/charset.cpp
engines/scumm/file_engine.cpp
engines/scumm/resource.cpp
engines/scumm/script_v5.cpp
engines/scumm/scumm.cpp
engines/scumm/smush/smush_player.cpp
video/coktel_decoder.cpp
diff --git a/audio/decoders/flac.cpp b/audio/decoders/flac.cpp
index 52df3d5f9cf..984b2a9d6ad 100644
--- a/audio/decoders/flac.cpp
+++ b/audio/decoders/flac.cpp
@@ -530,6 +530,7 @@ inline ::FLAC__StreamDecoderWriteStatus FLACStream::callbackWrite(const ::FLAC__
_sampleCache.bufReadPos = _sampleCache.bufData;
const uint cacheSpace = (_sampleCache.bufData + BUFFER_SIZE) - (_sampleCache.bufReadPos + _sampleCache.bufFill);
assert(numSamples <= cacheSpace);
+ (void)cacheSpace;
(*_methodConvertBuffers)(_sampleCache.bufReadPos + _sampleCache.bufFill, inChannels, numSamples, numChannels, numBits);
_sampleCache.bufFill += numSamples;
diff --git a/common/span.h b/common/span.h
index 3cc6dcd43fc..1cc5815f467 100644
--- a/common/span.h
+++ b/common/span.h
@@ -676,6 +676,7 @@ public:
allocate(numEntries);
const uint32 bytesRead = stream.read((void *)const_cast<mutable_value_type *>(_data), bytesRequested);
assert(bytesRead == bytesRequested);
+ (void)bytesRead;
return reinterpret_cast<mutable_value_derived_type &>(const_cast<Derived<value_type> &>(this->impl()));
}
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index f199166b4dd..be1ec9ac1c4 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -283,6 +283,7 @@ public:
// and make the structure point into it
void *end = this->toBuffer(_buffer);
assert(end <= _buffer + sz);
+ (void)end;
}
~ADDynamicGameDescription() {
diff --git a/engines/alg/game.cpp b/engines/alg/game.cpp
index 739ff76c8b9..bee89e52426 100644
--- a/engines/alg/game.cpp
+++ b/engines/alg/game.cpp
@@ -130,9 +130,11 @@ void Game::loadLibArchive(const Common::Path &path) {
uint16 magicBytes = _libFile.readSint16LE();
uint32 indexOffset = _libFile.readSint32LE();
assert(magicBytes == 1020);
+ (void)magicBytes;
_libFile.seek(indexOffset);
uint16 indexSize = _libFile.readSint16LE();
assert(indexSize > 0);
+ (void)indexSize;
while (true) {
uint32 entryOffset = _libFile.readSint32LE();
Common::String entryName = _libFile.readStream(13)->readString();
diff --git a/engines/alg/logic/game_bountyhunter.cpp b/engines/alg/logic/game_bountyhunter.cpp
index cac1abcb221..106c2c37d62 100644
--- a/engines/alg/logic/game_bountyhunter.cpp
+++ b/engines/alg/logic/game_bountyhunter.cpp
@@ -1022,6 +1022,7 @@ void GameBountyHunter::sceneIsoGivemoney(Scene *scene) {
void GameBountyHunter::sceneNxtscnLoseALife(Scene *scene) {
uint16 picked = 0;
int deadPlayerCount = 0;
+ (void)scene;
for (int i = 0; i < _numPlayers; i++) {
_playerLives[i]--;
displayLivesLeft(i);
@@ -1266,6 +1267,7 @@ void GameBountyHunter::sceneNxtscnDoBreakoutMains(Scene *scene) {
void GameBountyHunter::sceneNxtscnDiedRefed(Scene *scene) {
uint16 picked = 0;
uint8 deadCount = 0;
+ (void)scene;
for (int i = 0; i < _numPlayers; i++) {
_playerLives[i]--;
displayLivesLeft(i);
@@ -1284,6 +1286,7 @@ void GameBountyHunter::sceneNxtscnDiedRefed(Scene *scene) {
}
void GameBountyHunter::sceneNxtscnGiveShotgun(Scene *scene) {
+ (void)scene;
for (int i = 0; i < _numPlayers; i++) {
_playerShots[i] = 5;
_playerGun[i] = 2;
diff --git a/engines/alg/video.cpp b/engines/alg/video.cpp
index d1a2b8cbd16..744590b5998 100644
--- a/engines/alg/video.cpp
+++ b/engines/alg/video.cpp
@@ -57,6 +57,13 @@ void AlgVideoDecoder::loadVideoFromStream(uint32 offset) {
uint16 typeInterHh = _input->readUint16LE();
uint16 typeIntraHhv = _input->readUint16LE();
uint16 typeInterHhv = _input->readUint16LE();
+ (void)chunkType;
+ (void)typeRaw;
+ (void)typeInter;
+ (void)typeIntraHh;
+ (void)typeInterHh;
+ (void)typeIntraHhv;
+ (void)typeInterHhv;
if (chunkSize == 0x18) {
_audioType = _input->readUint16LE();
}
@@ -226,6 +233,7 @@ void AlgVideoDecoder::decodeIntraFrame(uint32 size, uint8 hh, uint8 hv) {
}
}
assert(bytesRemaining == 0);
+ (void)bytesRemaining;
}
void AlgVideoDecoder::decodeInterFrame(uint32 size, uint8 hh, uint8 hv) {
@@ -266,6 +274,7 @@ void AlgVideoDecoder::decodeInterFrame(uint32 size, uint8 hh, uint8 hv) {
}
delete replacement;
assert(bytesRead == size);
+ (void)bytesRead;
}
void AlgVideoDecoder::updatePalette(uint32 size, bool partial) {
@@ -288,10 +297,12 @@ void AlgVideoDecoder::updatePalette(uint32 size, bool partial) {
bytesRead += 3;
}
assert(bytesRead == size);
+ (void)bytesRead;
}
void AlgVideoDecoder::readAudioData(uint32 size, uint16 rate) {
assert(_audioType == 21);
+ (void)_audioType;
_audioStream->queuePacket(_input->readStream(size));
}
diff --git a/engines/glk/blorb.cpp b/engines/glk/blorb.cpp
index c81ccaecfe3..d3feeaffc9d 100644
--- a/engines/glk/blorb.cpp
+++ b/engines/glk/blorb.cpp
@@ -194,6 +194,7 @@ bool Blorb::readRIdx(Common::SeekableReadStream &stream, Common::Array<ChunkEntr
uint chunkLen = stream.readUint32BE();
uint count = stream.readUint32BE();
assert(count == (chunkLen - 4) / 12);
+ (void)chunkLen;
// First read in the resource index
for (uint idx = 0; idx < count; ++idx) {
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index 4faf29d0fae..1edb1fbcd00 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -162,6 +162,7 @@ byte Script::readByte() {
n = read(&v, 1);
assert(n == 1);
+ (void)n;
return v;
}
@@ -180,6 +181,7 @@ uint16 Script::readUint16() {
n = read(v, 2);
assert(n == 2);
+ (void)n;
return READ_LE_UINT16(v);
}
@@ -190,6 +192,7 @@ uint32 Script::readUint32() {
n = read(v, 4);
assert(n == 4);
+ (void)n;
return READ_LE_UINT32(v);
}
diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp
index be32e7054d1..9568ec12a08 100644
--- a/engines/gob/variables.cpp
+++ b/engines/gob/variables.cpp
@@ -90,6 +90,7 @@ void Variables::writeOff32(uint32 offset, uint32 value) {
void Variables::writeOffString(uint32 offset, const char *value) {
uint32 length = strlen(value);
assert((offset + length + 1) < _size);
+ (void)length;
Common::strcpy_s((char *)(_vars + offset), _size - offset, value);
}
diff --git a/engines/grim/emi/sound/codecs/scx.cpp b/engines/grim/emi/sound/codecs/scx.cpp
index 3daa8986d89..b2667c9a8b9 100644
--- a/engines/grim/emi/sound/codecs/scx.cpp
+++ b/engines/grim/emi/sound/codecs/scx.cpp
@@ -158,6 +158,7 @@ int SCXStream::readBuffer(int16 *buffer, const int numSamples) {
int samplesDecodedLeft = _xaStreams[0]->readBuffer(leftSamples, samplesPerChannel);
int samplesDecodedRight = _xaStreams[1]->readBuffer(rightSamples, samplesPerChannel);
assert(samplesDecodedLeft == samplesDecodedRight);
+ (void)samplesDecodedRight;
// Now re-interleave the data
int samplesDecoded = 0;
diff --git a/engines/grim/movie/codecs/smush_decoder.cpp b/engines/grim/movie/codecs/smush_decoder.cpp
index c7ed9ba8780..50f70dcf78b 100644
--- a/engines/grim/movie/codecs/smush_decoder.cpp
+++ b/engines/grim/movie/codecs/smush_decoder.cpp
@@ -155,6 +155,7 @@ bool SmushDecoder::readHeader() {
pos = _file->pos();
assert(tag == expectedTag);
+ (void)expectedTag;
if (tag == MKTAG('A', 'H', 'D', 'R')) { // Demo
uint32 version = _file->readUint16LE();
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 3e4ec5ed401..fe35fd1924d 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -235,6 +235,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
int strLength = 0; /* Used for stuff like "%13s" */
bool unsignedVar = false;
+ (void)maxsize;
if (position.getSegment())
startarg = 2;
else {
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 21b899eabfa..3bc1bc7cbe4 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -458,6 +458,7 @@ void unpackCelData(const SciSpan<const byte> &inBuffer, SciSpan<byte> &celBitmap
const byte *literalPtr = inBuffer.getUnsafeDataAt(literalPos, inBuffer.size() - literalPos);
const byte *const endOfResource = inBuffer.getUnsafeDataAt(inBuffer.size(), 0);
int pixelNr = 0;
+ (void)endOfResource;
memset(celBitmap.getUnsafeDataAt(0), clearColor, celBitmap.size());
diff --git a/engines/sci/resource/resource.cpp b/engines/sci/resource/resource.cpp
index 6f4cc397c55..97404e421fe 100644
--- a/engines/sci/resource/resource.cpp
+++ b/engines/sci/resource/resource.cpp
@@ -521,6 +521,7 @@ void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStrea
resource->_data = ptr;
const byte *const bufferEnd = resource->data() + uncompressedSize;
+ (void)bufferEnd;
while (stream->pos() < stream->size()) {
byte code = stream->readByte();
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 6daff971663..91134566fe6 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -1416,6 +1416,7 @@ int MidiPlayer_Midi::open(ResourceManager *resMan) {
int size = f.size();
assert(size >= 70);
+ (void)size;
f.seek(0x29);
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 93c97f9efbf..cb62b820b3d 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -1061,6 +1061,7 @@ void ScummEngine::createBoxMatrix() {
byte *matrixStart = _res->createResource(rtMatrix, 1, BOX_MATRIX_SIZE);
const byte *matrixEnd = matrixStart + BOX_MATRIX_SIZE;
+ (void)matrixEnd;
#define addToMatrix(b) do { *matrixStart++ = (b); assert(matrixStart < matrixEnd); } while (0)
@@ -1227,6 +1228,7 @@ bool ScummEngine_v0::areBoxesNeighbors(int box1nr, int box2nr) {
int i;
const int numOfBoxes = getNumBoxes();
const byte *boxm;
+ (void)numOfBoxes;
assert(box1nr < numOfBoxes);
assert(box2nr < numOfBoxes);
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index f459887b503..e30ab7e1f9b 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -2083,6 +2083,7 @@ void CharsetRendererNut::setCurID(int32 id) {
int numFonts = ((_vm->_game.id == GID_CMI) && (_vm->_game.features & GF_DEMO)) ? 4 : 5;
assert(id < numFonts);
+ (void)numFonts;
_curId = id;
if (!_fr[id]) {
char fontname[11];
diff --git a/engines/scumm/file_engine.cpp b/engines/scumm/file_engine.cpp
index d79a43d0a49..8e2b833d421 100644
--- a/engines/scumm/file_engine.cpp
+++ b/engines/scumm/file_engine.cpp
@@ -42,6 +42,7 @@ void ScummFile::setSubfileRange(int64 start, int32 len) {
const int64 fileSize = _baseStream->size();
assert(start <= fileSize);
assert(start + len <= fileSize);
+ (void)fileSize;
_subFileStart = start;
_subFileLen = len;
seek(0, SEEK_SET);
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index d80b14f4498..1960caefe18 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -759,6 +759,7 @@ int ScummEngine::getResourceSize(ResType type, ResId idx) {
Common::StackLock lock(_resourceAccessMutex);
byte *ptr = getResourceAddress(type, idx);
assert(ptr);
+ (void)ptr;
return _res->_types[type][idx]._size;
}
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index ca65110b13d..85afd917b2d 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2627,6 +2627,7 @@ void ScummEngine_v5::o5_roomOps() {
assert(ptr);
int r = file->read(ptr, len);
assert(r == len);
+ (void)r;
ptr[len] = '\0';
loadPtrToResource(rtString, a, ptr);
free(ptr);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 614d3e0c6c9..2b83db350db 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -161,6 +161,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
tmpStr[1] = dr.md5[2*i+1];
int res = sscanf(tmpStr, "%x", &tmpVal);
assert(res == 1);
+ (void)res;
_gameMD5[i] = (byte)tmpVal;
}
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index aa6185f011b..31c322a7e59 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -1014,6 +1014,7 @@ SmushFont *SmushPlayer::getFont(int font) {
} else {
int numFonts = (_vm->_game.id == GID_CMI && !(_vm->_game.features & GF_DEMO)) ? 5 : 4;
assert(font >= 0 && font < numFonts);
+ (void)numFonts;
Common::sprintf_s(file_font, "font%d.nut", font);
_sf[font] = new SmushFont(_vm, file_font, _vm->_game.id == GID_DIG && font != 0);
}
@@ -1041,6 +1042,7 @@ void SmushPlayer::parseNextFrame() {
const uint32 subType = _base->readUint32BE();
const int32 subSize = _base->readUint32BE();
const int32 subOffset = _base->pos();
+ (void)subType;
assert(subType == MKTAG('A','H','D','R'));
handleAnimHeader(subSize, *_base);
_base->seek(subOffset + subSize, SEEK_SET);
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 559f9d3c523..ea87db5a1f7 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -2724,8 +2724,10 @@ void VMDDecoder::filledSoundSlice(uint32 size) {
assert(buf);
const uint32 numBytesRead = _stream->read(buf, size);
assert(numBytesRead == size);
+ (void)numBytesRead;
const uint32 numBytesWritten = _oldStereoBuffer->write(buf, size);
assert(numBytesWritten == size);
+ (void)numBytesWritten;
free(buf);
return;
}
More information about the Scummvm-git-logs
mailing list