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

digitall noreply at scummvm.org
Fri Mar 18 08:40: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:
a90e78fd09 ICB: Fix Some Undefined Macro Compiler Warnings


Commit: a90e78fd09ccea62b796fd5d7f0f4019da5ae7bf
    https://github.com/scummvm/scummvm/commit/a90e78fd09ccea62b796fd5d7f0f4019da5ae7bf
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-18T08:39:58Z

Commit Message:
ICB: Fix Some Undefined Macro Compiler Warnings

These are emitted by GCC when -Wundef is passed.

Changed paths:
    engines/icb/prim_route_builder.cpp
    engines/icb/prim_route_builder.h


diff --git a/engines/icb/prim_route_builder.cpp b/engines/icb/prim_route_builder.cpp
index 89ed7216a4e..a98dffde0f9 100644
--- a/engines/icb/prim_route_builder.cpp
+++ b/engines/icb/prim_route_builder.cpp
@@ -137,7 +137,7 @@ _route_stat _prim_route_builder::Calc_route(PXreal startx, PXreal startz, PXreal
 
 	// reset the hit tables
 	for (go = 0; go < total_points; go++) { // goes for total number of points excluding target
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 		for (l = 0; l < total_points; l++) {
 			hits[go][l] = 0;
 			gohits[go][l] = 0;
@@ -190,7 +190,7 @@ _route_stat _prim_route_builder::Calc_route(PXreal startx, PXreal startz, PXreal
 
 				return (__PRIM_ROUTE_OK);
 			}
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 			hits[to][j] = 1;
 			gohits[0][j] = 1; // what hit in go 0
 #endif
@@ -213,7 +213,7 @@ _route_stat _prim_route_builder::Calc_route(PXreal startx, PXreal startz, PXreal
 			jremainder = lastp & 0x7;
 			flag = gohitsBits[go - 1][jplace] & (1 << jremainder);
 
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 			if ((flag != 0) != (gohits[go - 1][lastp] != 0)) {
 				Fatal_error("bits i:%d j:%d p:%d r:%d flag:%d gohits:%d", go - 1, lastp, jplace, jremainder, flag, gohits[go - 1][lastp]);
 			}
@@ -238,7 +238,7 @@ _route_stat _prim_route_builder::Calc_route(PXreal startx, PXreal startz, PXreal
 						// if it gets there then mark in
 						if (l == total_points - 2) {
 
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 							hits[lastp][thisp] = 1; // hits[point-hit-last-go] [point-that's-just-connected-this-go]
 							gohits[go][thisp] = 1; // this point hit this go
 #endif
@@ -316,7 +316,7 @@ void _prim_route_builder::Find_connects(uint32 point, PXreal cur_len, uint32 lev
 		jplace = point >> 3;
 		jremainder = point & 0x7;
 		flag = hitsBits[j][jplace] & (1 << jremainder);
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 		if ((flag != 0) != (hits[j][point] != 0)) {
 			Fatal_error("bits i:%d j:%d p:%d r:%d flag:%d hits:%d", j, point, jplace, jremainder, flag, hits[j][point]);
 		}
diff --git a/engines/icb/prim_route_builder.h b/engines/icb/prim_route_builder.h
index 4b4bc722e43..df191301ec5 100644
--- a/engines/icb/prim_route_builder.h
+++ b/engines/icb/prim_route_builder.h
@@ -84,7 +84,7 @@ private:
 	uint8 exclude[MAX_barriers];
 	uint8 temp_exclude[MAX_barriers];
 
-#if PRIM_BYTE_ARRAYS
+#if defined(PRIM_BYTE_ARRAYS) && PRIM_BYTE_ARRAYS
 	uint8 hits[MAX_barriers][MAX_barriers];
 	uint8 gohits[MAX_barriers][MAX_barriers];
 #endif




More information about the Scummvm-git-logs mailing list