[Scummvm-git-logs] scummvm master -> c5c083dd07132bb3c00e48d2bb8786051b3b8dc9
sev-
noreply at scummvm.org
Sun May 4 20:44:23 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:
c5c083dd07 JANITORIAL: Fix some release build warnings
Commit: c5c083dd07132bb3c00e48d2bb8786051b3b8dc9
https://github.com/scummvm/scummvm/commit/c5c083dd07132bb3c00e48d2bb8786051b3b8dc9
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2025-05-05T04:44:20+08:00
Commit Message:
JANITORIAL: Fix some release build warnings
* Unused locals (assert is no-op in release build)
* Bad usage of strncpy
* Uninitialized variables
Changed paths:
audio/decoders/adpcm.cpp
audio/mods/protracker.cpp
common/compression/unarj.cpp
common/formats/prodos.cpp
common/stream.cpp
graphics/larryScale.cpp
graphics/macgui/macwindowborder.cpp
graphics/nanosvg/nanosvg.h
graphics/tinygl/texture.cpp
video/3do_decoder.cpp
video/mve_decoder.cpp
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index 4d52a19caa9..1fd986a853d 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -476,6 +476,7 @@ int DK3_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
_stream->skip(2);
const uint16 rate = _stream->readUint16LE();
assert(rate == getRate());
+ (void)rate;
_stream->skip(6);
// Get predictor for both sum/diff channels
diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp
index 70928d21fa8..7e7f78d990b 100644
--- a/audio/mods/protracker.cpp
+++ b/audio/mods/protracker.cpp
@@ -67,6 +67,7 @@ ProtrackerStream::ProtrackerStream(Common::SeekableReadStream *stream, int offs,
_module = new Module();
bool result = _module->load(*stream, offs);
assert(result);
+ (void)result;
startPaula();
}
diff --git a/common/compression/unarj.cpp b/common/compression/unarj.cpp
index 7cc104bda8e..ba89cb7568c 100644
--- a/common/compression/unarj.cpp
+++ b/common/compression/unarj.cpp
@@ -834,6 +834,7 @@ Common::SharedArchiveContents ArjArchive::readContentsForPath(const Common::Path
if (hdr->method == 0) { // store
int32 len = archiveFile.read(uncompressedData + uncompressedPtr, hdr->origSize);
assert(len == hdr->origSize);
+ (void)len;
} else {
ArjDecoder *decoder = new ArjDecoder(hdr);
diff --git a/common/formats/prodos.cpp b/common/formats/prodos.cpp
index 1254c77df9f..64476f07027 100644
--- a/common/formats/prodos.cpp
+++ b/common/formats/prodos.cpp
@@ -31,7 +31,7 @@ ProDOSFile::ProDOSFile(char name[16], uint8 type, uint16 tBlk, uint32 eof, uint1
, _eof(eof)
, _blockPtr(bPtr)
, _disk(disk) {
- strncpy(_name, name, 16);
+ Common::strlcpy(_name, name, 16);
}
/* For debugging purposes, this prints the meta data of a file */
diff --git a/common/stream.cpp b/common/stream.cpp
index 5043193b489..3c832f8773a 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -546,6 +546,7 @@ public:
virtual ~BufferedWriteStream() {
const bool flushResult = flushBuffer();
assert(flushResult);
+ (void)flushResult;
delete _parentStream;
@@ -560,11 +561,13 @@ public:
} else if (_bufSize >= dataSize) { // check if we can flush the buffer and load the data
const bool flushResult = flushBuffer();
assert(flushResult);
+ (void)flushResult;
memcpy(_buf, dataPtr, dataSize);
_pos += dataSize;
} else { // too big for our buffer
const bool flushResult = flushBuffer();
assert(flushResult);
+ (void)flushResult;
return _parentStream->write(dataPtr, dataSize);
}
return dataSize;
diff --git a/graphics/larryScale.cpp b/graphics/larryScale.cpp
index 178912fe73b..2cb103f979f 100644
--- a/graphics/larryScale.cpp
+++ b/graphics/larryScale.cpp
@@ -296,6 +296,8 @@ void scaleUp(
assert(srcHeight > 0);
assert(dstWidth >= srcWidth && dstWidth <= 2 * src.getWidth());
assert(dstHeight >= srcHeight && dstHeight <= 2 * src.getHeight());
+ (void)srcWidth;
+ (void)srcHeight;
const MarginedBitmap<bool> linePixels = createMarginedLinePixelsBitmap(src);
Common::Array<Color> topDstRow(dstWidth);
diff --git a/graphics/macgui/macwindowborder.cpp b/graphics/macgui/macwindowborder.cpp
index 59b25febfc2..f2d3d3abb91 100644
--- a/graphics/macgui/macwindowborder.cpp
+++ b/graphics/macgui/macwindowborder.cpp
@@ -259,6 +259,8 @@ void MacWindowBorder::setBorder(Graphics::ManagedSurface *surface, uint32 flags,
offsets.titleBottom = -1;
offsets.titlePos = 0;
offsets.dark = false;
+ offsets.upperScrollHeight = 0;
+ offsets.lowerScrollHeight = 0;
setBorder(surface, flags, offsets);
}
diff --git a/graphics/nanosvg/nanosvg.h b/graphics/nanosvg/nanosvg.h
index a4e0882825c..87c467d8026 100644
--- a/graphics/nanosvg/nanosvg.h
+++ b/graphics/nanosvg/nanosvg.h
@@ -1616,7 +1616,7 @@ static int nsvg__parseRotate(float* xform, const char* str)
static void nsvg__parseTransform(float* xform, const char* str)
{
- float t[6];
+ float t[6] = {0.0f};
int len;
nsvg__xformIdentity(xform);
while (*str)
diff --git a/graphics/tinygl/texture.cpp b/graphics/tinygl/texture.cpp
index d3307c3910b..ee5315c30b7 100644
--- a/graphics/tinygl/texture.cpp
+++ b/graphics/tinygl/texture.cpp
@@ -97,6 +97,7 @@ void GLContext::glopBindTexture(GLParam *p) {
GLTexture *t;
assert(target == TGL_TEXTURE_2D);
+ (void)target;
t = find_texture(texture);
if (!t) {
diff --git a/video/3do_decoder.cpp b/video/3do_decoder.cpp
index f8ac4bd1555..0977a93157b 100644
--- a/video/3do_decoder.cpp
+++ b/video/3do_decoder.cpp
@@ -290,6 +290,7 @@ void ThreeDOMovieDecoder::readNextPacket() {
uint32 currentFrameStartTime = _videoTrack->getNextFrameStartTime();
uint32 nextFrameStartTime = videoTimeStamp * 1000 / 240;
assert(currentFrameStartTime <= nextFrameStartTime);
+ (void)currentFrameStartTime;
_videoTrack->setNextFrameStartTime(nextFrameStartTime);
// next time we want to start at the current chunk
diff --git a/video/mve_decoder.cpp b/video/mve_decoder.cpp
index 27ed2ce4d38..6fe80be3d7d 100644
--- a/video/mve_decoder.cpp
+++ b/video/mve_decoder.cpp
@@ -81,6 +81,9 @@ bool MveDecoder::loadStream(Common::SeekableReadStream *stream) {
assert(h1 == 0x001a);
assert(h2 == 0x0100);
assert(h3 == 0x1133);
+ (void)h1;
+ (void)h2;
+ (void)h3;
readPacketHeader();
while (!_done && _packetKind < 3) {
More information about the Scummvm-git-logs
mailing list