[Scummvm-git-logs] scummvm master -> 44018fe8901f40e334b361aaac1d1deec165b6a8

lephilousophe noreply at scummvm.org
Fri Oct 31 14:40:23 UTC 2025


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

Summary:
44018fe890 BUILD: Fix compilation with RetrowaveLib


Commit: 44018fe8901f40e334b361aaac1d1deec165b6a8
    https://github.com/scummvm/scummvm/commit/44018fe8901f40e334b361aaac1d1deec165b6a8
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2025-10-31T15:40:18+01:00

Commit Message:
BUILD: Fix compilation with RetrowaveLib

Commit 39a90b7 added the -Werror=newline-eof, but this caused the
compilation to fail when building with RetrowaveLib as it has headers
missing a newline at the end of the file.

Changed paths:
    audio/rwopl3.cpp
    audio/rwopl3.h


diff --git a/audio/rwopl3.cpp b/audio/rwopl3.cpp
index 398149c8e11..dd47e310c55 100644
--- a/audio/rwopl3.cpp
+++ b/audio/rwopl3.cpp
@@ -28,6 +28,11 @@
 
 #include "rwopl3.h"
 
+#ifdef COMPILER_HAS_NEWLINE_EOF_WARNING
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnewline-eof"
+#endif
+
 #include <RetroWaveLib/Board/OPL3.h>
 #include <RetroWaveLib/Platform/Linux_SPI.h>
 #include <RetroWaveLib/Platform/POSIX_SerialPort.h>
@@ -36,6 +41,10 @@
 #include <RetroWaveLib/Platform/Web_SerialPort.h>
 #endif
 
+#ifdef COMPILER_HAS_NEWLINE_EOF_WARNING
+#pragma GCC diagnostic pop
+#endif
+
 #include "common/config-manager.h"
 #include "common/debug.h"
 #include "common/tokenizer.h"
diff --git a/audio/rwopl3.h b/audio/rwopl3.h
index 47ffbdb4632..6ca81af805d 100644
--- a/audio/rwopl3.h
+++ b/audio/rwopl3.h
@@ -29,8 +29,23 @@
 #include "audio/fmopl.h"
 #include "common/mutex.h"
 
+#if defined(__clang__) && defined(__has_warning)
+#  if __has_warning("-Wnewline-eof")
+#    define COMPILER_HAS_NEWLINE_EOF_WARNING
+#  endif
+#endif
+
+#ifdef COMPILER_HAS_NEWLINE_EOF_WARNING
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnewline-eof"
+#endif
+
 #include <RetroWaveLib/RetroWave.h>
 
+#ifdef COMPILER_HAS_NEWLINE_EOF_WARNING
+#pragma GCC diagnostic pop
+#endif
+
 namespace OPL {
 namespace RetroWaveOPL3 {
 




More information about the Scummvm-git-logs mailing list