[Scummvm-git-logs] scummvm master -> 920087fe73720ff5010affd17f36852573cbe215

digitall noreply at scummvm.org
Tue Dec 26 03:59:16 UTC 2023


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:
920087fe73 M4: Fix Remaining GCC Compiler Warnings


Commit: 920087fe73720ff5010affd17f36852573cbe215
    https://github.com/scummvm/scummvm/commit/920087fe73720ff5010affd17f36852573cbe215
Author: D G Turner (digitall at scummvm.org)
Date: 2023-12-26T03:58:51Z

Commit Message:
M4: Fix Remaining GCC Compiler Warnings

Changed paths:
    engines/m4/adv_r/adv_player.h
    engines/m4/adv_r/conv.cpp
    engines/m4/adv_r/conv_io.cpp
    engines/m4/burger/walker.cpp
    engines/m4/core/rooms.h
    engines/m4/gui/hotkeys.cpp
    engines/m4/riddle/walker.cpp


diff --git a/engines/m4/adv_r/adv_player.h b/engines/m4/adv_r/adv_player.h
index b82fb814207..ca9da9f1a60 100644
--- a/engines/m4/adv_r/adv_player.h
+++ b/engines/m4/adv_r/adv_player.h
@@ -106,7 +106,6 @@ void player_inform_walker_new_scale(int32 frontY, int32 backY, int32 frontS, int
 
 bool player_load_series(const char *walkerName, const char *shadowName, bool load_palette);
 void player_first_walk(int32 x1, int32 y1, int32 f1, int32 x2, int32 y2, int32 f2, bool enable_commands_at_destination);
-void player_set_commands_allowed(bool t_or_f);
 void player_set_defaults();
 void player_noun_becomes_verb(int32 spriteNum);
 
diff --git a/engines/m4/adv_r/conv.cpp b/engines/m4/adv_r/conv.cpp
index a9f5c54f0c9..5d5debd71f3 100644
--- a/engines/m4/adv_r/conv.cpp
+++ b/engines/m4/adv_r/conv.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "m4/adv_r/conv.h"
+#include "m4/adv_r/adv_control.h"
 #include "m4/adv_r/chunk_ops.h"
 #include "m4/core/errors.h"
 #include "m4/core/imath.h"
diff --git a/engines/m4/adv_r/conv_io.cpp b/engines/m4/adv_r/conv_io.cpp
index 67173c783c4..8f5df9137cc 100644
--- a/engines/m4/adv_r/conv_io.cpp
+++ b/engines/m4/adv_r/conv_io.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "m4/adv_r/conv_io.h"
+#include "m4/adv_r/adv_control.h"
 #include "m4/adv_r/conv.h"
 #include "m4/adv_r/chunk_ops.h"
 #include "m4/adv_r/db_env.h"
diff --git a/engines/m4/burger/walker.cpp b/engines/m4/burger/walker.cpp
index 72226679b81..a2f255ef81a 100644
--- a/engines/m4/burger/walker.cpp
+++ b/engines/m4/burger/walker.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "m4/burger/walker.h"
+#include "m4/adv_r/adv_control.h"
 #include "m4/burger/vars.h"
 #include "m4/core/imath.h"
 #include "m4/graphics/gr_series.h"
diff --git a/engines/m4/core/rooms.h b/engines/m4/core/rooms.h
index e1272fb99cb..20b1216ffa9 100644
--- a/engines/m4/core/rooms.h
+++ b/engines/m4/core/rooms.h
@@ -24,6 +24,7 @@
 
 #include "common/hashmap.h"
 #include "m4/adv_r/adv.h"
+#include "m4/adv_r/adv_control.h"
 #include "m4/adv_r/adv_hotspot.h"
 
 namespace M4 {
diff --git a/engines/m4/gui/hotkeys.cpp b/engines/m4/gui/hotkeys.cpp
index c1c66b7dc4f..18a8bbfdf16 100644
--- a/engines/m4/gui/hotkeys.cpp
+++ b/engines/m4/gui/hotkeys.cpp
@@ -264,8 +264,8 @@ void Hotkeys::changeGlobal(void *, void *) {
 		_changeGlobalDialog->addButton(60, 40, " Change Global Variable ",
 			changeGlobalChange, 1);
 		_changeGlobalDialog->addButton(10, 40, " Cancel ", changeGlobalCancel, 2);
-		_changeGlobalDialog->addTextField(50, 7, gr_font_string_width("MMMMM") + 50,
-			"-----", nullptr, 3, 5);
+		char sep[5+1] = "-----";
+		_changeGlobalDialog->addTextField(50, 7, gr_font_string_width(sep) + 50, sep, nullptr, 3, 5);
 		_changeGlobalDialog->configure(3, 1, 2);
 		_changeGlobalDialog->show();
 	}
@@ -294,8 +294,9 @@ void Hotkeys::changeGlobalChange(void *, void *) {
 		Common::String::format("Assign new value to #%d ", _globalToChange).c_str(),
 		changeGlobalDoChange, 1);
 	_changeGlobalDialog->addButton(10, 40, " Cancel ", changeGlobalCancel, 2);
+	char val[5+1] = "MMMMM";
 	_changeGlobalDialog->addTextField(50, 7,
-		gr_font_string_width("MMMMM") + 50,
+		gr_font_string_width(val) + 50,
 		Common::String::format("%5d", globalVal).c_str(),
 		nullptr, 3, 5);
 	_changeGlobalDialog->configure(3, 1, 2);
@@ -353,7 +354,8 @@ void Hotkeys::teleport(void *, void *) {
 		_teleportDialog = DialogCreateAbsolute(260, 150, 385, 200, 61);
 		_teleportDialog->addButton(60, 30, " Teleport ", teleportOk, 1);
 		_teleportDialog->addButton(10, 30, " Cancel ", teleportCancel, 2);
-		_teleportDialog->addTextField(100, 10, gr_font_string_width("MMMM") + 100,
+		char sep_placeholder[4+1] = "MMMM";
+		_teleportDialog->addTextField(100, 10, gr_font_string_width(sep_placeholder) + 100,
 			"---", nullptr, 3, 3);
 		_teleportDialog->addMessage(10, 12, "Teleport where?", 4);
 		_teleportDialog->configure(3, 1, 2);
diff --git a/engines/m4/riddle/walker.cpp b/engines/m4/riddle/walker.cpp
index 93a02463327..4c335c108d7 100644
--- a/engines/m4/riddle/walker.cpp
+++ b/engines/m4/riddle/walker.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "m4/riddle/walker.h"
+#include "m4/adv_r/adv_control.h"
 #include "m4/riddle/vars.h"
 #include "m4/core/imath.h"
 #include "m4/graphics/gr_series.h"




More information about the Scummvm-git-logs mailing list