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

digitall noreply at scummvm.org
Fri Apr 22 13:15: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:
b59e24e117 AGS: Fix Cast Qualifier GCC Compiler Warnings


Commit: b59e24e1172bc1b260ecfe6bcb402e0954a2c804
    https://github.com/scummvm/scummvm/commit/b59e24e1172bc1b260ecfe6bcb402e0954a2c804
Author: D G Turner (digitall at scummvm.org)
Date: 2022-04-22T14:14:55+01:00

Commit Message:
AGS: Fix Cast Qualifier GCC Compiler Warnings

These are emitted if -Wcast-qual is passed to GCC.

Changed paths:
    engines/ags/engine/main/game_run.cpp


diff --git a/engines/ags/engine/main/game_run.cpp b/engines/ags/engine/main/game_run.cpp
index 55168765ea5..c2d559afae1 100644
--- a/engines/ags/engine/main/game_run.cpp
+++ b/engines/ags/engine/main/game_run.cpp
@@ -840,30 +840,30 @@ static bool ShouldStayInWaitMode() {
 
 	switch (_G(restrict_until).type) {
 	case UNTIL_MOVEEND: {
-		short *wkptr = (short *)_G(restrict_until).data_ptr;
+		const short *wkptr = (const short *)_G(restrict_until).data_ptr;
 		return !(wkptr[0] < 1);
 	}
 	case UNTIL_CHARIS0: {
-		char *chptr = (char *)_G(restrict_until).data_ptr;
+		const char *chptr = (const char *)_G(restrict_until).data_ptr;
 		return !(chptr[0] == 0);
 	}
 	case UNTIL_NEGATIVE: {
-		short *wkptr = (short *)_G(restrict_until).data_ptr;
+		const short *wkptr = (const short *)_G(restrict_until).data_ptr;
 		return !(wkptr[0] < 0);
 	}
 	case UNTIL_INTISNEG: {
-		int *wkptr = (int *)_G(restrict_until).data_ptr;
+		const int *wkptr = (const int *)_G(restrict_until).data_ptr;
 		return !(wkptr[0] < 0);
 	}
 	case UNTIL_NOOVERLAY: {
 		return !(_GP(play).text_overlay_on == 0);
 	}
 	case UNTIL_INTIS0: {
-		int *wkptr = (int *)_G(restrict_until).data_ptr;
+		const int *wkptr = (const int *)_G(restrict_until).data_ptr;
 		return !(wkptr[0] == 0);
 	}
 	case UNTIL_SHORTIS0: {
-		short *wkptr = (short *)_G(restrict_until).data_ptr;
+		const short *wkptr = (const short *)_G(restrict_until).data_ptr;
 		return !(wkptr[0] == 0);
 	}
 	case UNTIL_ANIMBTNEND: {




More information about the Scummvm-git-logs mailing list