From d93002f9a96a01258500ca7b5f03fe27e50a7155 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 20 Jul 2024 12:08:23 +0200 Subject: [PATCH] Build: Disable maybe-uninitialized warning for GCC that incorrectly triggers with std::optional --- cmake/compiler/gcc/settings.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index 3806ffee98471..4861f48dccc63 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -35,7 +35,8 @@ if(WITH_WARNINGS) -Winvalid-pch -Wfatal-errors -Woverloaded-virtual - -Wno-missing-field-initializers) # this warning is useless when combined with structure members that have default initializers + -Wno-missing-field-initializers # this warning is useless when combined with structure members that have default initializers + -Wno-maybe-uninitialized) # this warning causes many false positives with std::optional message(STATUS "GCC: All warnings enabled") endif()