summaryrefslogtreecommitdiff
path: root/Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch')
-rw-r--r--Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch b/Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch
new file mode 100644
index 0000000000..3cc6c47006
--- /dev/null
+++ b/Ports/openrct2/patches/0006-Add-compile-options-to-CMakeLists.txt.patch
@@ -0,0 +1,32 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= <offenhaeuser@protonmail.com>
+Date: Wed, 8 Feb 2023 10:45:25 +0100
+Subject: [PATCH] Add compile options to CMakeLists.txt
+
+This irons out some compiler warnings that turned into errors when compiling a release build.
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 76a17f24386dce3e364b292ac23867231123ebe5..687b2361b02ae1c82fc4de8320bdb28487872eec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -298,6 +298,8 @@ else ()
+ # unused-const-variable[=2] would check for unused values from headers as well
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_UNUSED_CONST_VARIABLE -Wunused-const-variable=1)
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_CLOBBERED -Wno-clobbered)
++ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_MAYBE_UNINITIALIZED -Wno-maybe-uninitialized)
++ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_NULL_DEREFERENCE -Wno-null-dereference)
+ # Disabled due to problems compiling OpenSSL on macOS.
+ # ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation)
+
+@@ -307,7 +309,7 @@ else ()
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
+
+ # Currently used MinGW w/GCC 7.2 doesn't provide sane error messages for this
+- ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference)
++ # ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference)
+ endif ()
+ # These have no workarounds available when building with LTO
+ if (NOT IPO_BUILD_ENABLED)