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

sev- noreply at scummvm.org
Sun Jun 12 08:24:37 UTC 2022


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

Summary:
b2322a8c4f JANITORIAL: Add some long casts to match %ld format


Commit: b2322a8c4fa30466153ad07fddf3816a563079b0
    https://github.com/scummvm/scummvm/commit/b2322a8c4fa30466153ad07fddf3816a563079b0
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-06-12T10:24:34+02:00

Commit Message:
JANITORIAL: Add some long casts to match %ld format

Needed on Win64 compilation.

Changed paths:
    audio/decoders/qdm2.cpp
    engines/glk/agt/os_glk.cpp
    engines/hdb/map.cpp
    engines/hypno/libfile.cpp
    engines/saga2/interp.cpp
    engines/saga2/sprite.cpp
    engines/testbed/cloud.cpp
    engines/toltecs/script.cpp


diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index dcc628b4d25..b7a1ed6986b 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -2481,7 +2481,7 @@ void QDM2Stream::qdm2_synthesis_filter(uint8 index)
 }
 
 bool QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioStream *audioStream) {
-	debug(1, "QDM2Stream::qdm2_decodeFrame in.pos(): %ld in.size(): %ld", in.pos(), in.size());
+	debug(1, "QDM2Stream::qdm2_decodeFrame in.pos(): %ld in.size(): %ld", long(in.pos()), long(in.size()));
 	int ch, i;
 	const int frame_size = (_sFrameSize * _channels);
 
diff --git a/engines/glk/agt/os_glk.cpp b/engines/glk/agt/os_glk.cpp
index 3df708972bf..899cd78affe 100644
--- a/engines/glk/agt/os_glk.cpp
+++ b/engines/glk/agt/os_glk.cpp
@@ -3238,7 +3238,7 @@ static void gagt_display_debug() {
 		        paragraph ? paragraph->id + 1 : 0,
 		        paragraph ? paragraph->line_count : 0,
 		        paragraph && paragraph->special
-		        ? paragraph->special - GAGT_SPECIALS + 1 : 0,
+		        ? long(paragraph->special - GAGT_SPECIALS + 1) : 0,
 		        line->buffer.allocation, line->buffer.length,
 		        line->indent, line->outdent,
 		        line->real_length,
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp
index 4acd503f908..8337952999b 100644
--- a/engines/hdb/map.cpp
+++ b/engines/hdb/map.cpp
@@ -306,7 +306,7 @@ bool Map::loadMap(char *name) {
 }
 
 bool Map::load(Common::SeekableReadStream *stream) {
-	debug(5, "map stream size: %ld(%lx)", stream->size(), stream->size());
+	debug(5, "map stream size: %ld(%lx)", long(stream->size()), long(stream->size()));
 
 	// Load MSM data header
 	stream->read(_name, 32);
diff --git a/engines/hypno/libfile.cpp b/engines/hypno/libfile.cpp
index 1aa7778b6e3..be433fe3fe1 100644
--- a/engines/hypno/libfile.cpp
+++ b/engines/hypno/libfile.cpp
@@ -44,7 +44,7 @@ bool LibFile::open(const Common::String &prefix, const Common::String &filename,
 		uint32 start = libfile.size();
 		FileEntry f;
 		libfile.seek(offset);
-		debugC(1, kHypnoDebugParser, "parsing at offset %d with size %li", offset, libfile.size());
+		debugC(1, kHypnoDebugParser, "parsing at offset %d with size %li", offset, long(libfile.size()));
 		while (true) {
 			f.name = "";
 			f.data.clear();
diff --git a/engines/saga2/interp.cpp b/engines/saga2/interp.cpp
index 95507e50a75..3f24eb80040 100644
--- a/engines/saga2/interp.cpp
+++ b/engines/saga2/interp.cpp
@@ -40,7 +40,7 @@ namespace Saga2 {
 #define IMMED_WORD(w)   ((w = *pc++),(w |= (*pc++)<<8)); \
 	debugC(3, kDebugScripts, "IMMED_WORD(%d 0x%04x)", w, w)
 #define BRANCH(w)       pc = codeSeg + (w); \
-	debugC(3, kDebugScripts, "BRANCH(%ld 0x%04lx)", pc - codeSeg, pc - codeSeg)
+	debugC(3, kDebugScripts, "BRANCH(%ld 0x%04lx)", long(pc - codeSeg), long(pc - codeSeg))
 
 const uint32        sagaID      = MKTAG('S', 'A', 'G', 'A'),
                     dataSegID   = MKTAG('_', '_', 'D', 'A'),
@@ -561,9 +561,9 @@ static void print_stack(int16 *stackBase, int16 *stack) {
 }
 
 #define D_OP(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s", (pc - codeSeg - 1), (pc - codeSeg - 1), #x)
-#define D_OP1(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s = %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, *stack)
-#define D_OP2(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] = %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *stack)
-#define D_OP3(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *addr)
+#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)
 
 bool Thread::interpret() {
 	uint8               *pc,
diff --git a/engines/saga2/sprite.cpp b/engines/saga2/sprite.cpp
index 9d5738e00f2..849f762780f 100644
--- a/engines/saga2/sprite.cpp
+++ b/engines/saga2/sprite.cpp
@@ -726,7 +726,7 @@ ActorAppearance *LoadActorAppearance(uint32 id, int16 banksNeeded) {
 		const int poseSize = 14;
 
 		debugC(1, kDebugLoading, "Pose List: bytes: %ld numAnimations: %d  poseOffset: %d calculated offset: %d numPoses: %d",
-			poseStream->size(), as->numAnimations, as->poseOffset, 8 + as->numAnimations * 32, poseBytes / poseSize);
+			long(poseStream->size()), as->numAnimations, as->poseOffset, 8 + as->numAnimations * 32, poseBytes / poseSize);
 
 		if (poseBytes % poseSize != 0)
 			warning("Incorrect number of poses, %d bytes more", poseBytes % poseSize);
diff --git a/engines/testbed/cloud.cpp b/engines/testbed/cloud.cpp
index 7ff9cc78b74..6ec619d97b9 100644
--- a/engines/testbed/cloud.cpp
+++ b/engines/testbed/cloud.cpp
@@ -91,7 +91,9 @@ void CloudTests::infoCallback(Cloud::Storage::StorageInfoResponse response) {
 	Testsuite::logPrintf("Info! User's ID: %s\n", response.value.uid().c_str());
 	Testsuite::logPrintf("Info! User's email: %s\n", response.value.email().c_str());
 	Testsuite::logPrintf("Info! User's name: %s\n", response.value.name().c_str());
-	Testsuite::logPrintf("Info! User's quota: %lu bytes used / %lu bytes available\n", response.value.used(), response.value.available());
+	Testsuite::logPrintf("Info! User's quota: %lu bytes used / %lu bytes available\n",
+						 static_cast<unsigned long>(response.value.used()),
+						 static_cast<unsigned long>(response.value.available()));
 }
 
 void CloudTests::directoryListedCallback(Cloud::Storage::FileArrayResponse response) {
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index ae2002555c1..4ed74423ef9 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -256,7 +256,7 @@ int16 ScriptInterpreter::readInt16() {
 void ScriptInterpreter::execOpcode(byte opcode) {
 	int16 ofs;
 
-	debug(2, "[%ld] %d", _code - _codeStart - 1, opcode);
+	debug(2, "[%ld] %d", long(_code - _codeStart - 1), opcode);
 
 	switch (opcode) {
 	case 0:




More information about the Scummvm-git-logs mailing list