[Scummvm-git-logs] scummvm master -> 2a8ce543399e379f3f212cb65424f373de71c74e
dwatteau
noreply at scummvm.org
Sat Oct 4 08:34:53 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:
2a8ce54339 M4: Fix -Wformat warnings for frac16 values on some platforms
Commit: 2a8ce543399e379f3f212cb65424f373de71c74e
https://github.com/scummvm/scummvm/commit/2a8ce543399e379f3f212cb65424f373de71c74e
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T10:33:34+02:00
Commit Message:
M4: Fix -Wformat warnings for frac16 values on some platforms
frac16 actually is an intptr, so use PRIdPTR/PRIxPTR.
Changed paths:
engines/m4/wscript/ws_cruncher.cpp
engines/m4/wscript/ws_hal.cpp
engines/m4/wscript/ws_machine.cpp
diff --git a/engines/m4/wscript/ws_cruncher.cpp b/engines/m4/wscript/ws_cruncher.cpp
index 0573d03bc1a..a965c216e6f 100644
--- a/engines/m4/wscript/ws_cruncher.cpp
+++ b/engines/m4/wscript/ws_cruncher.cpp
@@ -483,7 +483,7 @@ static bool ExtractArg(Anim8 *myAnim8, int32 myFormat, int32 myData, frac16 **ar
// myArg1 will point to this location
*argPtr = argValue;
- prefix += Common::String::format("%ld", *argValue);
+ prefix += Common::String::format("%" PRIdPTR, *argValue);
dbg_AddParamToCurrMachInstr(prefix.c_str());
}
diff --git a/engines/m4/wscript/ws_hal.cpp b/engines/m4/wscript/ws_hal.cpp
index 5c37f320890..e1d8adbea36 100644
--- a/engines/m4/wscript/ws_hal.cpp
+++ b/engines/m4/wscript/ws_hal.cpp
@@ -68,14 +68,14 @@ void ws_DumpMachine(machine *m, Common::WriteStream *logFile) {
// Loop through the main set of registers, and dump out the contents
for (i = 0; i < IDX_COUNT; i++) {
tempFloat = (float)(myRegs[i] >> 16) + (float)((float)(myRegs[i] & 0xffff) / (float)65536);
- logFile->writeString(Common::String::format("\t%d\t%s:\t\t%.2f\t\t0x%08" PRIx64 "\n", i, myRegLabels[i], tempFloat, (int64)myRegs[i]));
+ logFile->writeString(Common::String::format("\t%d\t%s:\t\t%.2f\t\t0x%08" PRIxPTR "\n", i, myRegLabels[i], tempFloat, myRegs[i]));
}
// If the anim8 has extra local regs
if (myAnim8->numLocalVars > 0) {
for (i = IDX_COUNT; i < IDX_COUNT + myAnim8->numLocalVars; i++) {
tempFloat = (float)(myRegs[i] >> 16) + (float)((float)(myRegs[i] & 0xffff) / (float)65536);
- logFile->writeString(Common::String::format("\t%d\tlocal.%d:\t\t%.2f\t\t0x%08" PRIx64 "\n", i, i - IDX_COUNT, tempFloat, (int64)myRegs[i]));
+ logFile->writeString(Common::String::format("\t%d\tlocal.%d:\t\t%.2f\t\t0x%08" PRIxPTR "\n", i, i - IDX_COUNT, tempFloat, myRegs[i]));
}
}
logFile->writeString(Common::String::format("\n"));
diff --git a/engines/m4/wscript/ws_machine.cpp b/engines/m4/wscript/ws_machine.cpp
index 34d610400e9..1385182a382 100644
--- a/engines/m4/wscript/ws_machine.cpp
+++ b/engines/m4/wscript/ws_machine.cpp
@@ -1153,7 +1153,7 @@ void sendWSMessage(uint32 msgHash, frac16 msgValue, machine *recvM,
uint32 machHash, machine *sendM, int32 msgCount) {
bool sendToAll;
- debugC(1, kDebugMessages, "Message %xh, %lxh, %s, %xh, %s, %d",
+ debugC(1, kDebugMessages, "Message %xh, %" PRIxPTR "h, %s, %xh, %s, %d",
msgHash, msgValue, recvM ? recvM->machName : "NONE",
machHash, sendM ? sendM->machName : "NONE", msgCount);
More information about the Scummvm-git-logs
mailing list