[Scummvm-git-logs] scummvm master -> 52c98bbdfba3f83091ce0222ac7ba698e371b596
bluegr
noreply at scummvm.org
Wed Oct 15 18:10:52 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:
52c98bbdfb TOT: fix warning for integer comparison mismatch
Commit: 52c98bbdfba3f83091ce0222ac7ba698e371b596
https://github.com/scummvm/scummvm/commit/52c98bbdfba3f83091ce0222ac7ba698e371b596
Author: Carlo Bramini (carlo_bramini at users.sourceforge.net)
Date: 2025-10-15T21:10:48+03:00
Commit Message:
TOT: fix warning for integer comparison mismatch
Compiling SCUMMVM prints this warning:
engines/tot/engine.cpp: In function âbyte* Tot::getArrow(uint, uint)â:
engines/tot/engine.cpp:4472:26: warning: comparison of integer expressions of different signedness: âintâ and âuintâ {aka âunsigned intâ} [-Wsign-compare]
4472 | for(int i = 0; i < h; i++) {
| ~~^~~
Actually, h is declared as uint and it doesn't change:
https://github.com/scummvm/scummvm/blob/c731b511a37a164f86096121788d76bba2ab3548/engines/tot/engine.cpp#L4463
so it is worth to declare i as uint too, just to remove this annoying message.
Changed paths:
engines/tot/engine.cpp
diff --git a/engines/tot/engine.cpp b/engines/tot/engine.cpp
index 4dec463328b..1cdfda5cec8 100644
--- a/engines/tot/engine.cpp
+++ b/engines/tot/engine.cpp
@@ -4469,7 +4469,7 @@ byte *getArrow(uint x, uint y) {
uint originalW = menuFile.readUint16LE() + 1;
- for(int i = 0; i < h; i++) {
+ for(uint i = 0; i < h; i++) {
menuFile.seek(menuOffset + 4 + + (y + i) * originalW + x);
menuFile.read(bitmap + 4 + i * w, w);
}
More information about the Scummvm-git-logs
mailing list