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

digitall noreply at scummvm.org
Thu Jun 23 22:52:22 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:
e95b2054b4 GLK: SCOTT: Fix Remaining GCC Compiler Warnings


Commit: e95b2054b46027b1f91cec126f4f47549a5e3dcf
    https://github.com/scummvm/scummvm/commit/e95b2054b46027b1f91cec126f4f47549a5e3dcf
Author: D G Turner (digitall at scummvm.org)
Date: 2022-06-23T23:51:50+01:00

Commit Message:
GLK: SCOTT: Fix Remaining GCC Compiler Warnings

Changed paths:
    engines/glk/scott/seas_of_blood.cpp
    engines/glk/scott/unp64/exo_util.cpp
    engines/glk/scott/unp64/scanners/section8.cpp
    engines/glk/scott/unp64/scanners/xtc.cpp
    engines/glk/scott/unp64/unp64.cpp


diff --git a/engines/glk/scott/seas_of_blood.cpp b/engines/glk/scott/seas_of_blood.cpp
index 593fdf339c1..18d747705d1 100644
--- a/engines/glk/scott/seas_of_blood.cpp
+++ b/engines/glk/scott/seas_of_blood.cpp
@@ -259,7 +259,7 @@ glui32 optimalDicePixelSize(glui32 *width, glui32 *height) {
 	glui32 graphwidth, graphheight;
 	g_scott->glk_window_get_size(_G(_leftDiceWin), &graphwidth, &graphheight);
 	multiplier = graphheight / idealHeight;
-	if (idealWidth * multiplier > graphwidth)
+	if ((glui32)(idealWidth * multiplier) > graphwidth)
 		multiplier = graphwidth / idealWidth;
 
 	if (multiplier < 2)
@@ -539,7 +539,7 @@ void clearStamina(void) {
 		g_scott->glk_stream_set_current(g_scott->glk_window_get_stream(win));
 
 		g_scott->glk_window_move_cursor(win, 11, 5);
-		for (int i = 0; i < width - 13; i++)
+		for (int i = 0; i < (int)width - 13; i++)
 			g_scott->glk_put_string(" ");
 		drawBorder(win);
 		win = _G(_battleRight);
diff --git a/engines/glk/scott/unp64/exo_util.cpp b/engines/glk/scott/unp64/exo_util.cpp
index 7fea9fbc11e..831d1ac4895 100644
--- a/engines/glk/scott/unp64/exo_util.cpp
+++ b/engines/glk/scott/unp64/exo_util.cpp
@@ -79,9 +79,10 @@ int findSys(const byte *buf, int target) {
 		case 2:
 			if (strchr(" (", c) != nullptr)
 				break;
+			// fallthrough
 			/* convert string number to int */
 		case 3:
-			outstart = (int)strtol((char *)(buf + i), (char **)&sysEnd, 10);
+			outstart = (int)strtol((const char *)(buf + i), (char **)&sysEnd, 10);
 			if ((buf + i) == sysEnd) {
 				/* we got nothing */
 				outstart = -1;
diff --git a/engines/glk/scott/unp64/scanners/section8.cpp b/engines/glk/scott/unp64/scanners/section8.cpp
index 5485ffac96f..cfd0fee5ab5 100644
--- a/engines/glk/scott/unp64/scanners/section8.cpp
+++ b/engines/glk/scott/unp64/scanners/section8.cpp
@@ -35,7 +35,7 @@ void scnSection8(UnpStr *unp) {
 	mem =unp->_mem;
 	if (unp->_depAdr == 0) {
 		for (p = 0x810; p <= 0x828; p++) {
-			if ((*(unsigned int *)(mem + p) == (0x00BD00A2 + (((p & 0xff) + 0x11) << 24))) &&
+			if ((*(unsigned int *)(mem + p) == (unsigned int)(0x00BD00A2 + (((p & 0xff) + 0x11) << 24))) &&
 				(*(unsigned int *)(mem + p + 0x04) == 0x01009D08) &&
 				(*(unsigned int *)(mem + p + 0x10) == 0x34A97801) &&
 				(*(unsigned int *)(mem + p + 0x6a) == 0xB1017820) &&
diff --git a/engines/glk/scott/unp64/scanners/xtc.cpp b/engines/glk/scott/unp64/scanners/xtc.cpp
index 24f692491cc..cdffb223f33 100644
--- a/engines/glk/scott/unp64/scanners/xtc.cpp
+++ b/engines/glk/scott/unp64/scanners/xtc.cpp
@@ -52,7 +52,7 @@ void scnXTC(UnpStr *unp) {
 	if (unp->_depAdr == 0) {
 		for (p = 0x801; p < 0x80c; p += 0x0a) {
 			if ((*(unsigned short int *)(mem + p + 0x02) == 0xE678) &&
-				(*(unsigned int *)(mem + p + 0x07) == (0xce08 | ((p + 0x10) << 16))) &&
+				(*(unsigned int *)(mem + p + 0x07) == (unsigned int)(0xce08 | ((p + 0x10) << 16))) &&
 				(*(unsigned int *)(mem + p + 0x0e) == 0xC8000099) &&
 				(*(unsigned int *)(mem + p + 0x23) == 0x4CF7D0CA)) {
 				/* has variable codebytes so addresses varies */
diff --git a/engines/glk/scott/unp64/unp64.cpp b/engines/glk/scott/unp64/unp64.cpp
index de646a6bbff..76effc8cab2 100644
--- a/engines/glk/scott/unp64/unp64.cpp
+++ b/engines/glk/scott/unp64/unp64.cpp
@@ -140,7 +140,7 @@ int unp64(uint8_t *compressed, size_t length, uint8_t *destinationBuffer, size_t
 						 0xA7, 0xA7, 0x79, 0xA6, 0x9C, 0xE3};
 
 	int iterMax = ITERMAX;
-	int copyRoms[2][2] = {{0xa000, 0}, {0xe000, 0}};
+	//int copyRoms[2][2] = {{0xa000, 0}, {0xe000, 0}};
 	int p;
 
 	memset(&_G(_unp), 0, sizeof(_G(_unp)));
@@ -230,10 +230,10 @@ int unp64(uint8_t *compressed, size_t length, uint8_t *destinationBuffer, size_t
 				case 'x':
 					break;
 				case 'B':
-					copyRoms[0][1] = 1;
+					//copyRoms[0][1] = 1;
 					break;
 				case 'K':
-					copyRoms[1][1] = 1;
+					//copyRoms[1][1] = 1;
 					break;
 				case 'c':
 					_G(_unp)._recurs++;
@@ -307,7 +307,7 @@ int unp64(uint8_t *compressed, size_t length, uint8_t *destinationBuffer, size_t
 		r->_sp = 0xff;
 	}
 
-	if (info->_start > (0x314 + sizeof(vector))) {
+	if (info->_start > (long int)(0x314 + sizeof(vector))) {
 		/* some packers use values in irq pointers to decrypt themselves */
 		memcpy(mem + 0x314, vector, sizeof(vector));
 	}




More information about the Scummvm-git-logs mailing list