[Scummvm-git-logs] scummvm master -> 39a90b7f27a793b27485d5207046c8f85a521cbc

dwatteau noreply at scummvm.org
Sun Oct 5 18:06:44 UTC 2025


This automated email contains information about 11 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
99a1a6e9b7 BLADERUNNER: Fix build with MSVC 2015 (C1004)
22ab9d3b08 CRAB: Fix build with MSVC 2015 (C1004)
f4b53b463c FREESCAPE: Fix build with MSVC 2015 (C1004)
b9ed02198f GOB: Fix build with MSVC 2015 (C1004)
74118c42e5 TESTBED: Fix build with MSVC 2015 (C1004)
04e913e40c IMAGE: Fix build with MSVC 2015 (C1004)
6b3ccbd036 WATCHMAKER: Fix build with MSVC 2015 (C1004)
ad9d4d60fc AGS: Fix build with MSVC 2015 (C1004)
2e9b0f183a DEVTOOLS: Fix build with MSVC 2015 (C1004)
4dea9d9782 MATH: Add workaround for MSVC 2015 compiler bug (C2248)
39a90b7f27 BUILD: Ask modern compilers to help diagnose MSVC 2015's C1004


Commit: 99a1a6e9b7f18e453e4a2a209b8d1a408db04bdb
    https://github.com/scummvm/scummvm/commit/99a1a6e9b7f18e453e4a2a209b8d1a408db04bdb
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T18:10:30+02:00

Commit Message:
BLADERUNNER: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/bladerunner/color.cpp


diff --git a/engines/bladerunner/color.cpp b/engines/bladerunner/color.cpp
index 134158db8c3..3a281bb13dc 100644
--- a/engines/bladerunner/color.cpp
+++ b/engines/bladerunner/color.cpp
@@ -38,4 +38,4 @@ uint8 Color::get8BitColorFrom5Bit(uint8 col5b) {
 	return map5BitsTo8Bits[col5b];
 }
 	
-} // End of namespace BladeRunner
\ No newline at end of file
+} // End of namespace BladeRunner


Commit: 22ab9d3b08f297099b205538c6420d2ae292b543
    https://github.com/scummvm/scummvm/commit/22ab9d3b08f297099b205538c6420d2ae292b543
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T18:50:10+02:00

Commit Message:
CRAB: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/crab/rapidxml/rapidxml.hpp
    engines/crab/rapidxml/rapidxml_print.hpp


diff --git a/engines/crab/rapidxml/rapidxml.hpp b/engines/crab/rapidxml/rapidxml.hpp
index 9892113b75d..7a416dda45b 100644
--- a/engines/crab/rapidxml/rapidxml.hpp
+++ b/engines/crab/rapidxml/rapidxml.hpp
@@ -2514,4 +2514,4 @@ namespace rapidxml
     #pragma warning(pop)
 #endif
 
-#endif
\ No newline at end of file
+#endif
diff --git a/engines/crab/rapidxml/rapidxml_print.hpp b/engines/crab/rapidxml/rapidxml_print.hpp
index 73174c52cab..c0ad9ded278 100644
--- a/engines/crab/rapidxml/rapidxml_print.hpp
+++ b/engines/crab/rapidxml/rapidxml_print.hpp
@@ -398,4 +398,4 @@ namespace rapidxml
 	}
 }
 
-#endif
\ No newline at end of file
+#endif


Commit: f4b53b463ccca626b5f57d6995622f05bc949c9a
    https://github.com/scummvm/scummvm/commit/f4b53b463ccca626b5f57d6995622f05bc949c9a
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:40:06+02:00

Commit Message:
FREESCAPE: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/freescape/doodle.cpp
    engines/freescape/doodle.h
    engines/freescape/games/castle/amiga.cpp
    engines/freescape/games/dark/c64.cpp
    engines/freescape/games/driller/amiga.cpp
    engines/freescape/games/driller/c64.cpp
    engines/freescape/games/driller/cpc.cpp
    engines/freescape/games/eclipse/c64.cpp
    engines/freescape/loaders/c64.cpp
    engines/freescape/objects/connections.h
    engines/freescape/objects/group.cpp
    engines/freescape/sweepAABB.cpp
    engines/freescape/sweepAABB.h


diff --git a/engines/freescape/doodle.cpp b/engines/freescape/doodle.cpp
index 2f5e2864a7b..e6ee83f5c8a 100644
--- a/engines/freescape/doodle.cpp
+++ b/engines/freescape/doodle.cpp
@@ -126,4 +126,4 @@ void DoodleDecoder::processDoodleCell(int cellIdx, const byte *highresData,
 	}
 }
 
-} // End of namespace Image
\ No newline at end of file
+} // End of namespace Image
diff --git a/engines/freescape/doodle.h b/engines/freescape/doodle.h
index 94a26d6a2d6..785e1eb779d 100644
--- a/engines/freescape/doodle.h
+++ b/engines/freescape/doodle.h
@@ -56,4 +56,4 @@ private:
 
 } // End of namespace Image
 
-#endif
\ No newline at end of file
+#endif
diff --git a/engines/freescape/games/castle/amiga.cpp b/engines/freescape/games/castle/amiga.cpp
index 7f9d589d590..7b941850e3e 100644
--- a/engines/freescape/games/castle/amiga.cpp
+++ b/engines/freescape/games/castle/amiga.cpp
@@ -140,4 +140,4 @@ void CastleEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
 	drawStringInSurface(_currentArea->_name, 97, 182, 0, 0, surface);
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index 729f8294cd4..50fc9e4db9f 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -246,4 +246,4 @@ void DarkEngine::drawC64UI(Graphics::Surface *surface) {
 	drawVerticalCompass(surface, 17, 77, _pitch, front);
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/games/driller/amiga.cpp b/engines/freescape/games/driller/amiga.cpp
index c62499fdd3e..15d1a6d27de 100644
--- a/engines/freescape/games/driller/amiga.cpp
+++ b/engines/freescape/games/driller/amiga.cpp
@@ -346,4 +346,4 @@ void DrillerEngine::initAmigaAtari() {
 	_soundIndexCrushed = 11;
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/games/driller/c64.cpp b/engines/freescape/games/driller/c64.cpp
index 314efbef187..43804769fe8 100644
--- a/engines/freescape/games/driller/c64.cpp
+++ b/engines/freescape/games/driller/c64.cpp
@@ -246,4 +246,4 @@ void DrillerEngine::drawC64UI(Graphics::Surface *surface) {
 	drawCompass(surface, 223, 156, _pitch - 30, 12, 60, yellow);
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/games/driller/cpc.cpp b/engines/freescape/games/driller/cpc.cpp
index 3849509a429..138875d3204 100644
--- a/engines/freescape/games/driller/cpc.cpp
+++ b/engines/freescape/games/driller/cpc.cpp
@@ -240,4 +240,4 @@ void DrillerEngine::drawCPCUI(Graphics::Surface *surface) {
 	drawCompass(surface, 230, 156, _pitch - 30, 10, 60, front);
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/games/eclipse/c64.cpp b/engines/freescape/games/eclipse/c64.cpp
index bc1e8a74f5b..2e37c562f95 100644
--- a/engines/freescape/games/eclipse/c64.cpp
+++ b/engines/freescape/games/eclipse/c64.cpp
@@ -176,4 +176,4 @@ void EclipseEngine::drawC64UI(Graphics::Surface *surface) {
 	drawEclipseIndicator(surface, 224, 0, front, green);
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/loaders/c64.cpp b/engines/freescape/loaders/c64.cpp
index 46d9e7f9c2e..2f7c3499f3d 100644
--- a/engines/freescape/loaders/c64.cpp
+++ b/engines/freescape/loaders/c64.cpp
@@ -48,4 +48,4 @@ byte *FreescapeEngine::decompressC64RLE(byte *buffer, int *size, byte marker) {
 	return data;
 }
 
-} // namespace Freescape
\ No newline at end of file
+} // namespace Freescape
diff --git a/engines/freescape/objects/connections.h b/engines/freescape/objects/connections.h
index ef0cbaf0934..5a5b58427ab 100644
--- a/engines/freescape/objects/connections.h
+++ b/engines/freescape/objects/connections.h
@@ -42,4 +42,4 @@ public:
 
 } // End of namespace Freescape
 
-#endif // FREESCAPE_CONNECTIONS_H
\ No newline at end of file
+#endif // FREESCAPE_CONNECTIONS_H
diff --git a/engines/freescape/objects/group.cpp b/engines/freescape/objects/group.cpp
index b0f7a299bf8..c0a3d3bb605 100644
--- a/engines/freescape/objects/group.cpp
+++ b/engines/freescape/objects/group.cpp
@@ -215,4 +215,4 @@ bool Group::collides(const Math::AABB &aabb) {
 	return false;
 }
 
-} // End of namespace Freescape
\ No newline at end of file
+} // End of namespace Freescape
diff --git a/engines/freescape/sweepAABB.cpp b/engines/freescape/sweepAABB.cpp
index 05f4b5566e6..426c0e15c38 100644
--- a/engines/freescape/sweepAABB.cpp
+++ b/engines/freescape/sweepAABB.cpp
@@ -99,4 +99,4 @@ float sweepAABB(Math::AABB const &a, Math::AABB const &b, Math::Vector3d const &
 	return h;
 }
 
-}
\ No newline at end of file
+}
diff --git a/engines/freescape/sweepAABB.h b/engines/freescape/sweepAABB.h
index ea29a1f0683..f666f117851 100644
--- a/engines/freescape/sweepAABB.h
+++ b/engines/freescape/sweepAABB.h
@@ -31,4 +31,4 @@ extern float sweepAABB(Math::AABB const &a, Math::AABB const &b, Math::Vector3d
 
 // End of namespace Freescape
 
-#endif // FREESCAPE_SWEEPAABB_H
\ No newline at end of file
+#endif // FREESCAPE_SWEEPAABB_H


Commit: b9ed02198f9ea15376e2a147a55baf4b74f2b550
    https://github.com/scummvm/scummvm/commit/b9ed02198f9ea15376e2a147a55baf4b74f2b550
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:40:06+02:00

Commit Message:
GOB: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/gob/html_parser.h


diff --git a/engines/gob/html_parser.h b/engines/gob/html_parser.h
index b5af34f7aef..80aa18786d5 100644
--- a/engines/gob/html_parser.h
+++ b/engines/gob/html_parser.h
@@ -117,4 +117,4 @@ private:
 
 } // End of namespace Gob
 
-#endif // GOB_HTML_PARSER_H
\ No newline at end of file
+#endif // GOB_HTML_PARSER_H


Commit: 74118c42e5c7ac9bfe61c971f95b393b04294df6
    https://github.com/scummvm/scummvm/commit/74118c42e5c7ac9bfe61c971f95b393b04294df6
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:40:06+02:00

Commit Message:
TESTBED: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/testbed/detection.h


diff --git a/engines/testbed/detection.h b/engines/testbed/detection.h
index 93822cff6c4..220a329e3ca 100644
--- a/engines/testbed/detection.h
+++ b/engines/testbed/detection.h
@@ -25,4 +25,3 @@
  #define GAMEOPTION_INTERACTIVE_MODE GUIO_GAMEOPTIONS1
  
  #endif
- 
\ No newline at end of file


Commit: 04e913e40cc8b2415ccba0a88f35b37025d4dc84
    https://github.com/scummvm/scummvm/commit/04e913e40cc8b2415ccba0a88f35b37025d4dc84
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:40:06+02:00

Commit Message:
IMAGE: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    image/neo.cpp
    image/neo.h
    image/scr.h


diff --git a/image/neo.cpp b/image/neo.cpp
index 51fd1710bc0..f0e032c8dd2 100644
--- a/image/neo.cpp
+++ b/image/neo.cpp
@@ -116,4 +116,4 @@ bool NeoDecoder::loadStream(Common::SeekableReadStream &stream) {
 	return true;
 }
 
-} // End of namespace Image
\ No newline at end of file
+} // End of namespace Image
diff --git a/image/neo.h b/image/neo.h
index 850681c4c95..e53dcbd2ee8 100644
--- a/image/neo.h
+++ b/image/neo.h
@@ -61,4 +61,4 @@ private:
 };
 } // End of namespace Image
 
-#endif // IMAGE_NEO_H
\ No newline at end of file
+#endif // IMAGE_NEO_H
diff --git a/image/scr.h b/image/scr.h
index 50d12d465fd..1fa7d7bc4a6 100644
--- a/image/scr.h
+++ b/image/scr.h
@@ -62,4 +62,4 @@ private:
 };
 } // End of namespace Image
 
-#endif // IMAGE_SCR_H
\ No newline at end of file
+#endif // IMAGE_SCR_H


Commit: 6b3ccbd036a00795c23d414b637715aa01c50ec3
    https://github.com/scummvm/scummvm/commit/6b3ccbd036a00795c23d414b637715aa01c50ec3
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:42:26+02:00

Commit Message:
WATCHMAKER: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    engines/watchmaker/classes/do_inv_inv.cpp


diff --git a/engines/watchmaker/classes/do_inv_inv.cpp b/engines/watchmaker/classes/do_inv_inv.cpp
index 6606f4b1bba..3f4854fa3c5 100644
--- a/engines/watchmaker/classes/do_inv_inv.cpp
+++ b/engines/watchmaker/classes/do_inv_inv.cpp
@@ -130,4 +130,4 @@ void doInvInvUseWith(WGame &game) {
 			PlayerSpeak(game, init.InvObj[UseWith[USED]].action[CurPlayer]);
 }
 
-} // End of namespace Watchmaker
\ No newline at end of file
+} // End of namespace Watchmaker


Commit: ad9d4d60fc7b669df73f81aae825b66aaea95b78
    https://github.com/scummvm/scummvm/commit/ad9d4d60fc7b669df73f81aae825b66aaea95b78
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:43:37+02:00

Commit Message:
AGS: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

(Actually, the engine still has issues with MSVC 2015. But let's be
coherent in fixing all C1004 cases.)

Changed paths:
    engines/ags/shared/util/resource_cache.h


diff --git a/engines/ags/shared/util/resource_cache.h b/engines/ags/shared/util/resource_cache.h
index 0b650eb7260..744a998399a 100644
--- a/engines/ags/shared/util/resource_cache.h
+++ b/engines/ags/shared/util/resource_cache.h
@@ -363,4 +363,4 @@ private:
 } // namespace AGS
 } // namespace AGS3
 
-#endif // AGS_SHARED_UTIL_RESOURCE_CACHE_H
\ No newline at end of file
+#endif // AGS_SHARED_UTIL_RESOURCE_CACHE_H


Commit: 2e9b0f183a92016a32355ae0cfdf7a6506e2a36e
    https://github.com/scummvm/scummvm/commit/2e9b0f183a92016a32355ae0cfdf7a6506e2a36e
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:44:31+02:00

Commit Message:
DEVTOOLS: Fix build with MSVC 2015 (C1004)

Missing newline at end of file.

Changed paths:
    devtools/create_myst3/file.h
    devtools/create_nancy/cif.cpp


diff --git a/devtools/create_myst3/file.h b/devtools/create_myst3/file.h
index 8a435013be8..1dc8c339b5c 100644
--- a/devtools/create_myst3/file.h
+++ b/devtools/create_myst3/file.h
@@ -209,4 +209,4 @@ public:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/devtools/create_nancy/cif.cpp b/devtools/create_nancy/cif.cpp
index d56c39550a1..29da06109d4 100644
--- a/devtools/create_nancy/cif.cpp
+++ b/devtools/create_nancy/cif.cpp
@@ -220,4 +220,4 @@ byte *createCifTree(uint16 gameVersion, Common::Array<const char *> filenames, c
 
 	outSize = retPos;
 	return ret;
-}
\ No newline at end of file
+}


Commit: 4dea9d9782084af1f9db773557d74dd79bf15ca1
    https://github.com/scummvm/scummvm/commit/4dea9d9782084af1f9db773557d74dd79bf15ca1
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T19:52:08+02:00

Commit Message:
MATH: Add workaround for MSVC 2015 compiler bug (C2248)

At least MSVC 2015 (14.0.25420.01 Update 3) will hit a C2248 compiler
error.  Quoting @lephilousophe, "It looks like a bug. It tries to
generate a move constructor but it believes it can't access the base
constructor, although the constructor it creates is in a child class,
while the MatrixBase constructor is protected."

Since MSVC 2015 is still able to compile most of the engines and
components (not all of them, though), having a local hack for it
seems reasonable...

Changed paths:
    math/matrix.h
    math/vector.h


diff --git a/math/matrix.h b/math/matrix.h
index e75702a5d8c..b70e53c19e4 100644
--- a/math/matrix.h
+++ b/math/matrix.h
@@ -142,12 +142,17 @@ public:
 	Matrix<rows, cols> &operator/=(float factor);
 	Matrix<rows, cols> &operator/=(const Matrix<rows, cols> &m);
 
+#if defined(_MSC_VER) && _MSC_VER < 1910 // HACK: C2248 bug in MSVC 2015
+public:
+#else
 protected:
+#endif
 	constexpr MatrixBase() = default;
 	MatrixBase(const float *data);
 	MatrixBase(const MatrixBase<rows, cols> &m);
 	MatrixBase &operator=(const MatrixBase<rows, cols> &m);
 
+protected:
 	inline const Matrix<rows, cols> &getThis() const {
 		return *static_cast<const Matrix<rows, cols> *>(this); }
 	inline Matrix<rows, cols> &getThis() {
@@ -163,7 +168,11 @@ private:
  */
 template<int r, int c>
 class MatrixType : public MatrixBase<r, c> {
+#if defined(_MSC_VER) && _MSC_VER < 1910 // HACK: C2248 bug in MSVC 2015
+public:
+#else
 protected:
+#endif
 	constexpr MatrixType() : MatrixBase<r, c>() { }
 	MatrixType(const float *data) : MatrixBase<r, c>(data) { }
 	MatrixType(const MatrixBase<r, c> &m) : MatrixBase<r, c>(m) { }
diff --git a/math/vector.h b/math/vector.h
index 73ef079e3e5..4e536768f7d 100644
--- a/math/vector.h
+++ b/math/vector.h
@@ -57,7 +57,11 @@ public:
 	 */
 	void readFromStream(Common::ReadStream *stream);
 
+#if defined(_MSC_VER) && _MSC_VER < 1910 // HACK: C2248 bug in MSVC 2015
+public:
+#else
 protected:
+#endif
 	MatrixType() : MatrixBase<dim, 1>() { }
 	MatrixType(const float *data) : MatrixBase<dim, 1>(data) { }
 	MatrixType(const MatrixBase<dim, 1> &m) : MatrixBase<dim, 1>(m) { }


Commit: 39a90b7f27a793b27485d5207046c8f85a521cbc
    https://github.com/scummvm/scummvm/commit/39a90b7f27a793b27485d5207046c8f85a521cbc
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-05T20:02:58+02:00

Commit Message:
BUILD: Ask modern compilers to help diagnose MSVC 2015's C1004

A few dozens of files had this issue, and it's easier to flag and fix
them if modern (and frequently used) compilers look for it as well
(although C++11 seems not to care for this case?).

Release builds are not affected (it's not critical at all), and you
can already use `--disable-Werror` if you have a reason not to want
any enforced `-Werror=...` flag during local development.

Changed paths:
    configure


diff --git a/configure b/configure
index b32844093bd..df0dc22b5c9 100755
--- a/configure
+++ b/configure
@@ -2698,6 +2698,14 @@ set_flag_if_supported -Wno-pragma-pack
 
 set_flag_if_supported -Wno-address-of-packed-member
 
+# We still have (limited) support for MSVC 2015, but it's easy for it to
+# hit fatal C1004 errors, if some files are missing a final newline. Since
+# it's quite easy for this to happen, ask more modern compilers to help
+# our old friend.
+if test "$_release_build" != yes && test "$_werror_build" != no; then
+	set_flag_if_supported -Werror=newline-eof
+fi
+
 if test -n "$STRINGS"; then
 	_strings=$STRINGS
 else




More information about the Scummvm-git-logs mailing list