[Scummvm-git-logs] scummvm master -> 0235b1a7e1e44f6d98d3b0f1f270c4edc1f5ce02

digitall noreply at scummvm.org
Mon Jan 23 09:51:40 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:
0235b1a7e1 MM: MM1: Fix Unused Variable GCC Compiler Warning


Commit: 0235b1a7e1e44f6d98d3b0f1f270c4edc1f5ce02
    https://github.com/scummvm/scummvm/commit/0235b1a7e1e44f6d98d3b0f1f270c4edc1f5ce02
Author: D G Turner (digitall at scummvm.org)
Date: 2023-01-23T09:50:02Z

Commit Message:
MM: MM1: Fix Unused Variable GCC Compiler Warning

This code should be reviewed as the wrong variable may be in use here.

Changed paths:
    engines/mm/mm1/game/combat.cpp


diff --git a/engines/mm/mm1/game/combat.cpp b/engines/mm/mm1/game/combat.cpp
index 8f1b296a5d2..f31b78635bc 100644
--- a/engines/mm/mm1/game/combat.cpp
+++ b/engines/mm/mm1/game/combat.cpp
@@ -406,14 +406,14 @@ void Combat::selectTreasure() {
 void Combat::selectTreasure2(int count) {
 	static const byte TREASURES_ARR1[6] = { 1, 61, 86, 121, 156, 171 };
 	static const byte TREASURES_ARR2[6] = { 12, 5, 7, 7, 3, 12 };
-	byte val1, val2;
 	int idx;
 
 	_treasureFlags[count - 1] = true;
 
 	idx = getRandomNumber(0, 5);
-	val1 = TREASURES_ARR1[idx];
-	val2 = TREASURES_ARR2[idx];
+	// FIXME: Should these be used instead of _val1 class variable?
+	//byte val1 = TREASURES_ARR1[idx];
+	//byte val2 = TREASURES_ARR2[idx];
 
 	for (idx = 0; idx < count; ++idx)
 		_val1 += _allowFight;




More information about the Scummvm-git-logs mailing list