[Scummvm-git-logs] scummvm master -> f5a505782f1446f2031ed54bd160a67e6b25bd42

sev- noreply at scummvm.org
Sun May 14 20:57:16 UTC 2023


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bf6e38ca4a SAGA2: Fix -Wformat warning
4f7ff00250 GROOVIE: Fix -Wformat warnings on 32-bit archs
6c14baa394 AUDIO: Fix -Wformat warning in QDM2
35ef507eda FREESCAPE: Fix -Wformat warnings
f5a505782f DIRECTOR: Fix -Wformat warning


Commit: bf6e38ca4a27b5cfe6b3a58a87ff35d55c8caaf7
    https://github.com/scummvm/scummvm/commit/bf6e38ca4a27b5cfe6b3a58a87ff35d55c8caaf7
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-14T22:57:11+02:00

Commit Message:
SAGA2: Fix -Wformat warning

Changed paths:
    engines/saga2/interp.cpp


diff --git a/engines/saga2/interp.cpp b/engines/saga2/interp.cpp
index c6c9af5d617..a81923ac141 100644
--- a/engines/saga2/interp.cpp
+++ b/engines/saga2/interp.cpp
@@ -560,7 +560,7 @@ static void print_stack(int16 *_stackBase, int16 *stack) {
 	debugC(3, kDebugScripts, "]");
 }
 
-#define D_OP(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s", (pc - _codeSeg - 1), (pc - _codeSeg - 1), #x)
+#define D_OP(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s", long(pc - _codeSeg - 1), long(pc - _codeSeg - 1), #x)
 #define D_OP1(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s = %d", long(pc - _codeSeg - 1), long(pc - _codeSeg - 1), #x, *stack)
 #define D_OP2(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] = %d", long(pc - _codeSeg - 1), long(pc - _codeSeg - 1), #x, (void *)addr, *stack)
 #define D_OP3(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] %d", long(pc - _codeSeg - 1), long(pc - _codeSeg - 1), #x, (void *)addr, *addr)


Commit: 4f7ff00250bec970f86d5f19bcd10dc2e8efd238
    https://github.com/scummvm/scummvm/commit/4f7ff00250bec970f86d5f19bcd10dc2e8efd238
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-14T22:57:11+02:00

Commit Message:
GROOVIE: Fix -Wformat warnings on 32-bit archs

Changed paths:
    engines/groovie/video/roq.cpp


diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index c6b7fe84231..0556cbecd88 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -545,7 +545,7 @@ bool ROQPlayer::processBlock() {
 	}
 
 	if (endpos != _file->pos() && !_file->eos()) {
-		warning("Groovie::ROQ: BLOCK %04x Should have ended at %ld, and has ended at %d", blockHeader.type, endpos, (int)_file->pos());
+		warning("Groovie::ROQ: BLOCK %04x Should have ended at %lld, and has ended at %lld", blockHeader.type, (long long)endpos, (long long)_file->pos());
 		warning("Ensure you've copied the files correctly according to the wiki.");
 		_file->seek(MIN(_file->pos(), endpos));
 	}
@@ -699,7 +699,7 @@ bool ROQPlayer::processBlockQuadVector(ROQBlockHeader &blockHeader) {
 		}
 		_file->skip(skipBytes);
 		if (skipBytes != 2) {
-			warning("Groovie::ROQ: Skipped %ld bytes", skipBytes);
+			warning("Groovie::ROQ: Skipped %lld bytes", (long long)skipBytes);
 		}
 	}
 	return true;


Commit: 6c14baa39425e494154a2037673f3333ffdc1c00
    https://github.com/scummvm/scummvm/commit/6c14baa39425e494154a2037673f3333ffdc1c00
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-14T22:57:11+02:00

Commit Message:
AUDIO: Fix -Wformat warning in QDM2

Changed paths:
    audio/decoders/qdm2.cpp


diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index 03dc688a79e..130a0007846 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -2499,7 +2499,7 @@ bool QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioSt
 	}
 
 	if ((in.size() - in.pos()) < _packetSize) {
-		debug(1, "QDM2Stream::qdm2_decodeFrame Insufficient Packet Data in Input Stream Found: %ld Need: %d", in.size() - in.pos(), _packetSize);
+		debug(1, "QDM2Stream::qdm2_decodeFrame Insufficient Packet Data in Input Stream Found: %ld Need: %d", long(in.size() - in.pos()), _packetSize);
 		return false;
 	}
 


Commit: 35ef507eda409b663ecf356f0b1f14b4aaae643e
    https://github.com/scummvm/scummvm/commit/35ef507eda409b663ecf356f0b1f14b4aaae643e
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-14T22:57:11+02:00

Commit Message:
FREESCAPE: Fix -Wformat warnings

Changed paths:
    engines/freescape/loaders/8bitBinaryLoader.cpp


diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 3c35b3d3497..e570d4dbb65 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -191,7 +191,7 @@ Object *FreescapeEngine::load8bitObject(Common::SeekableReadStream *file) {
 			// instructions = getInstructions(conditionSource);
 			debugC(1, kFreescapeDebugParser, "%s", conditionSource.c_str());
 		}
-		debugC(1, kFreescapeDebugParser, "End of object at %lx", file->pos());
+		debugC(1, kFreescapeDebugParser, "End of object at %lx", long(file->pos()));
 
 		if (!GeometricObject::isPolygon(objectType))
 			position = 32 * position;
@@ -219,7 +219,7 @@ Object *FreescapeEngine::load8bitObject(Common::SeekableReadStream *file) {
 			byteSizeOfObject = 0;
 		}
 		assert(byteSizeOfObject == 0);
-		debugC(1, kFreescapeDebugParser, "End of object at %lx", file->pos());
+		debugC(1, kFreescapeDebugParser, "End of object at %lx", long(file->pos()));
 		// create an entrance
 		return new Entrance(
 			objectID,
@@ -260,7 +260,7 @@ Object *FreescapeEngine::load8bitObject(Common::SeekableReadStream *file) {
 			conditionSource = detokenise8bitCondition(conditionArray, instructions, isCastle());
 			debugC(1, kFreescapeDebugParser, "%s", conditionSource.c_str());
 		}
-		debugC(1, kFreescapeDebugParser, "End of object at %lx", file->pos());
+		debugC(1, kFreescapeDebugParser, "End of object at %lx", long(file->pos()));
 		// create an entrance
 		return new Sensor(
 			objectID,
@@ -436,7 +436,7 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
 	debugC(1, kFreescapeDebugParser, "Area %d", areaNumber);
 	debugC(1, kFreescapeDebugParser, "Flags: %d Objects: %d", areaFlags, numberOfObjects);
 	// debug("Condition Ptr: %x", cPtr);
-	debugC(1, kFreescapeDebugParser, "Pos before first object: %lx", file->pos());
+	debugC(1, kFreescapeDebugParser, "Pos before first object: %lx", long(file->pos()));
 
 	// Driller specific
 	uint8 gasPocketX = 0;
@@ -543,7 +543,7 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
 		}
 	}
 
-	debugC(1, kFreescapeDebugParser, "End of area at %lx", file->pos());
+	debugC(1, kFreescapeDebugParser, "End of area at %lx", long(file->pos()));
 	return area;
 }
 
@@ -617,7 +617,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
 		loadDemoData(file, offset + demoDataTable, 128); // TODO: check this size
 
 	file->seek(offset + globalByteCodeTable);
-	debugC(1, kFreescapeDebugParser, "Position: %lx\n", file->pos());
+	debugC(1, kFreescapeDebugParser, "Position: %lx\n", long(file->pos()));
 
 	uint8 numConditions = readField(file, 8);
 	debugC(1, kFreescapeDebugParser, "%d global conditions", numConditions);
@@ -625,7 +625,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
 		FCLInstructionVector instructions;
 		// get the length
 		uint32 lengthOfCondition = readField(file, 8);
-		debugC(1, kFreescapeDebugParser, "length of condition: %d at %lx", lengthOfCondition, file->pos());
+		debugC(1, kFreescapeDebugParser, "length of condition: %d at %lx", lengthOfCondition, long(file->pos()));
 		// get the condition
 		if (lengthOfCondition > 0) {
 			Common::Array<uint8> conditionArray = readArray(file, lengthOfCondition);
@@ -673,7 +673,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
 		file->seek(offset + 0xc8);
 	// file->seek(offset + 0x4f); //CPC
 
-	debugC(1, kFreescapeDebugParser, "areas index at: %lx", file->pos());
+	debugC(1, kFreescapeDebugParser, "areas index at: %lx", long(file->pos()));
 	uint16 *fileOffsetForArea = new uint16[numberOfAreas];
 	for (uint16 area = 0; area < numberOfAreas; area++) {
 		fileOffsetForArea[area] = readField(file, 16);


Commit: f5a505782f1446f2031ed54bd160a67e6b25bd42
    https://github.com/scummvm/scummvm/commit/f5a505782f1446f2031ed54bd160a67e6b25bd42
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-05-14T22:57:11+02:00

Commit Message:
DIRECTOR: Fix -Wformat warning

Changed paths:
    engines/director/resource.cpp


diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index b9ece548774..2ef76960bed 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -698,7 +698,7 @@ bool ProjectorArchive::loadArchive(Common::SeekableReadStream *stream) {
 			size = SWAP_BYTES_32(size);
 		}
 
-		debugC(1, kDebugLoading, "Entry: %s offset %lX tag %s size %d", arr[i].c_str(), stream->pos() - 8, tag2str(tag), size);
+		debugC(1, kDebugLoading, "Entry: %s offset %lX tag %s size %d", arr[i].c_str(), long(stream->pos() - 8), tag2str(tag), size);
 
 		Entry entry;
 




More information about the Scummvm-git-logs mailing list