[Scummvm-git-logs] scummvm master -> 78db82f6e129eb71b3a59de0c8a52b5c4641d165

digitall noreply at scummvm.org
Tue Mar 15 10:17:50 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:
78db82f6e1 SCI: Fix Undefined Macro Compiler Warnings


Commit: 78db82f6e129eb71b3a59de0c8a52b5c4641d165
    https://github.com/scummvm/scummvm/commit/78db82f6e129eb71b3a59de0c8a52b5c4641d165
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-15T10:17:12Z

Commit Message:
SCI: Fix Undefined Macro Compiler Warnings

These warnings are emitted by GCC if -Wundef is passed.

Changed paths:
    engines/sci/graphics/video32.cpp
    engines/sci/resource/resource.cpp
    engines/sci/util.h


diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index c1a38a2791d..5d8f16f5058 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -913,7 +913,7 @@ void VMDPlayer::submitPalette(const uint8 rawPalette[256 * 3]) const {
 	for (uint16 i = _endColor + 1; i < ARRAYSIZE(palette.colors); ++i) {
 		palette.colors[i].used = false;
 	}
-#if SCI_VMD_BLACK_PALETTE
+#ifdef SCI_VMD_BLACK_PALETTE
 	if (_blackPalette) {
 		for (uint16 i = _startColor; i <= _endColor; ++i) {
 			palette.colors[i].r = palette.colors[i].g = palette.colors[i].b = 0;
@@ -936,7 +936,7 @@ void VMDPlayer::submitPalette(const uint8 rawPalette[256 * 3]) const {
 		g_sci->_gfxPalette32->updateHardware();
 	}
 
-#if SCI_VMD_BLACK_PALETTE
+#ifdef SCI_VMD_BLACK_PALETTE
 	if (_blackPalette) {
 		fillPalette(rawPalette, palette);
 		if (_isComposited) {
diff --git a/engines/sci/resource/resource.cpp b/engines/sci/resource/resource.cpp
index aec1b8d293b..fcaffdc8cad 100644
--- a/engines/sci/resource/resource.cpp
+++ b/engines/sci/resource/resource.cpp
@@ -105,7 +105,7 @@ const char *getSciVersionDesc(SciVersion version) {
 
 //////////////////////////////////////////////////////////////////////
 
-//#define SCI_VERBOSE_RESMAN 1
+//#define SCI_VERBOSE_RESMAN
 
 static const char *const s_errorDescriptions[] = {
 	"No error",
@@ -1142,7 +1142,7 @@ void ResourceManager::addToLRU(Resource *res) {
 	}
 	_LRU.push_front(res);
 	_memoryLRU += res->size();
-#if SCI_VERBOSE_RESMAN
+#ifdef SCI_VERBOSE_RESMAN
 	debug("Adding %s (%d bytes) to lru control: %d bytes total",
 	      res->_id.toString().c_str(), res->size,
 	      _memoryLRU);
diff --git a/engines/sci/util.h b/engines/sci/util.h
index 41124c8f192..842c233908d 100644
--- a/engines/sci/util.h
+++ b/engines/sci/util.h
@@ -134,7 +134,7 @@ class SciSpanImpl : public Common::NamedSpanImpl<ValueType, Derived> {
 #if !defined(__GNUC__) || GCC_ATLEAST(3, 0)
 	template <typename T, template <typename> class U> friend class SciSpanImpl;
 #endif
-#if CXXTEST_RUNNING
+#if defined(CXXTEST_RUNNING) && CXXTEST_RUNNING
 	friend class ::SpanTestSuite;
 #endif
 




More information about the Scummvm-git-logs mailing list