mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03:00
33 lines
1.7 KiB
Diff
33 lines
1.7 KiB
Diff
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)
|