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

digitall noreply at scummvm.org
Wed Apr 27 11:26:52 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:
ead607938b AGS: Fix Various Signed vs. Unsigned Comparison GCC Warnings


Commit: ead607938bbbd9704bb7bab1e9484e6014e0f4f7
    https://github.com/scummvm/scummvm/commit/ead607938bbbd9704bb7bab1e9484e6014e0f4f7
Author: D G Turner (digitall at scummvm.org)
Date: 2022-04-27T12:25:46+01:00

Commit Message:
AGS: Fix Various Signed vs. Unsigned Comparison GCC Warnings

Changed paths:
    engines/ags/engine/game/savegame.cpp
    engines/ags/shared/debugging/debug_manager.cpp
    engines/ags/shared/util/directory.cpp
    engines/ags/shared/util/memory_stream.cpp


diff --git a/engines/ags/engine/game/savegame.cpp b/engines/ags/engine/game/savegame.cpp
index 3096e2bf75c..0eb59d36cb7 100644
--- a/engines/ags/engine/game/savegame.cpp
+++ b/engines/ags/engine/game/savegame.cpp
@@ -513,7 +513,7 @@ HSaveError DoAfterRestore(const PreservedParams &pp, const RestoredData &r_data)
 
 	if (_G(displayed_room) >= 0) {
 		// Fixup the frame index, in case the restored room does not have enough background frames
-		if (_GP(play).bg_frame < 0 || static_cast<size_t>(_GP(play).bg_frame) >= (int)_GP(thisroom).BgFrameCount)
+		if (_GP(play).bg_frame < 0 || static_cast<size_t>(_GP(play).bg_frame) >= _GP(thisroom).BgFrameCount)
 			_GP(play).bg_frame = 0;
 
 		for (int i = 0; i < MAX_ROOM_BGFRAMES; ++i) {
diff --git a/engines/ags/shared/debugging/debug_manager.cpp b/engines/ags/shared/debugging/debug_manager.cpp
index d13466adb3a..a1ddc1b404d 100644
--- a/engines/ags/shared/debugging/debug_manager.cpp
+++ b/engines/ags/shared/debugging/debug_manager.cpp
@@ -52,7 +52,7 @@ void DebugOutput::SetEnabled(bool enable) {
 }
 
 void DebugOutput::SetGroupFilter(DebugGroupID id, MessageType verbosity) {
-	int key = _GP(DbgMgr).GetGroup(id).UID.ID;
+	uint32_t key = _GP(DbgMgr).GetGroup(id).UID.ID;
 	if (key != kDbgGroup_None)
 		_groupFilter[key] = verbosity;
 	else
diff --git a/engines/ags/shared/util/directory.cpp b/engines/ags/shared/util/directory.cpp
index 2938eb2e0e4..392c870178d 100644
--- a/engines/ags/shared/util/directory.cpp
+++ b/engines/ags/shared/util/directory.cpp
@@ -193,7 +193,7 @@ bool FindFileRecursive::Next() {
 }
 
 bool FindFileRecursive::PushDir(const String &sub) {
-	if (_maxLevel != SIZE_MAX && (int)_fdirs.size() == _maxLevel)
+	if (_maxLevel != SIZE_MAX && (uint32_t)_fdirs.size() == _maxLevel)
 		return false; // no more nesting allowed
 
 	String path = Path::ConcatPaths(_fullDir, sub);
diff --git a/engines/ags/shared/util/memory_stream.cpp b/engines/ags/shared/util/memory_stream.cpp
index 62fc4c764e6..7ac04914bc6 100644
--- a/engines/ags/shared/util/memory_stream.cpp
+++ b/engines/ags/shared/util/memory_stream.cpp
@@ -63,7 +63,7 @@ bool MemoryStream::IsValid() const {
 }
 
 bool MemoryStream::EOS() const {
-	return _pos >= (soff_t)_len;
+	return _pos >= _len;
 }
 
 soff_t MemoryStream::GetLength() const {
@@ -134,7 +134,7 @@ size_t MemoryStream::Write(const void *buffer, size_t size) {
 }
 
 int32_t MemoryStream::WriteByte(uint8_t val) {
-	if (_pos >= (soff_t)_buf_sz) { return -1; }
+	if (_pos >= _buf_sz) { return -1; }
 	*(_buf + _pos) = val;
 	_pos++; _len++;
 	return val;




More information about the Scummvm-git-logs mailing list