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

digitall noreply at scummvm.org
Thu Mar 17 09:49:32 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:
a91b97cc95 GLK: GLULX: Fix Undefined Macro Compiler Warnings


Commit: a91b97cc95f14c2a489a4da16b7ec046298b8929
    https://github.com/scummvm/scummvm/commit/a91b97cc95f14c2a489a4da16b7ec046298b8929
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-17T09:48:43Z

Commit Message:
GLK: GLULX: Fix Undefined Macro Compiler Warnings

These are emitted by GCC when -Wundef is passed.

Changed paths:
    engines/glk/glulx/exec.cpp
    engines/glk/glulx/glulx.h
    engines/glk/glulx/serial.cpp


diff --git a/engines/glk/glulx/exec.cpp b/engines/glk/glulx/exec.cpp
index a1695d31966..82bcd530350 100644
--- a/engines/glk/glulx/exec.cpp
+++ b/engines/glk/glulx/exec.cpp
@@ -567,7 +567,7 @@ PerformJump: /* goto label for successful jumping... ironic, no? */
 				break;
 
 			case op_debugtrap:
-#if VM_DEBUGGER
+#ifdef VM_DEBUGGER
 				/* We block and handle debug commands, but only if the
 				   library has invoked debug features. (Meaning, has
 				   the cycle handler ever been called.) */
@@ -1046,7 +1046,7 @@ PerformJump: /* goto label for successful jumping... ironic, no? */
 		}
 	}
 	/* done executing */
-#if VM_DEBUGGER
+#ifdef VM_DEBUGGER
 	debugger_handle_quit();
 #endif /* VM_DEBUGGER */
 }
diff --git a/engines/glk/glulx/glulx.h b/engines/glk/glulx/glulx.h
index c217ba94ad5..44a93802eac 100644
--- a/engines/glk/glulx/glulx.h
+++ b/engines/glk/glulx/glulx.h
@@ -819,7 +819,7 @@ public:
 	int init_profile();
 	void profile_set_call_counts(int flag);
 
-	#if VM_PROFILING
+#ifdef VM_PROFILING
 	uint profile_opcount;
 	#define profile_tick() (profile_opcount++)
 	int profile_profiling_active();
@@ -827,16 +827,16 @@ public:
 	void profile_out(uint stackuse);
 	void profile_fail(const char *reason);
 	void profile_quit();
-	#else /* VM_PROFILING */
+#else /* VM_PROFILING */
 	void profile_tick() {}
 	void profile_profiling_active() {}
 	void profile_in(uint addr, uint stackuse, int accel) {}
 	void profile_out(uint stackuse)  {}
 	void profile_fail(const char *reason) {}
 	void profile_quit() {}
-	#endif /* VM_PROFILING */
+#endif /* VM_PROFILING */
 
-#if VM_DEBUGGER
+#ifdef VM_DEBUGGER
 	unsigned long debugger_opcount;
 	void debugger_tick() { debugger_opcount++ }
 	int debugger_load_info_stream(strid_t stream);
diff --git a/engines/glk/glulx/serial.cpp b/engines/glk/glulx/serial.cpp
index 635cae2ed6f..6942949fd83 100644
--- a/engines/glk/glulx/serial.cpp
+++ b/engines/glk/glulx/serial.cpp
@@ -170,7 +170,7 @@ uint Glulx::perform_restoreundo() {
 	uint *heapsumarr = nullptr;
 
 	/* If profiling is enabled and active then fail. */
-#if VM_PROFILING
+#ifdef VM_PROFILING
 	if (profile_profiling_active())
 		return 1;
 #endif /* VM_PROFILING */




More information about the Scummvm-git-logs mailing list