QmlDesigner: Improve warning suppression

Can be removed with never compiler.

Change-Id: I3196acfc82e3ab53f0f72dec3b543f27b9bbe2e1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2023-05-09 13:07:36 +02:00
parent bd9f49f026
commit 8129f886bc
2 changed files with 2 additions and 8 deletions

View File

@@ -51,17 +51,10 @@ public:
return first.id >= second.id; return first.id >= second.id;
} }
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
constexpr friend InternalIntegerType operator-(BasicId first, BasicId second) constexpr friend InternalIntegerType operator-(BasicId first, BasicId second)
{ {
return first.id - second.id; return first.id - second.id;
} }
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
constexpr bool isValid() const { return id > 0; } constexpr bool isValid() const { return id > 0; }

View File

@@ -8,7 +8,8 @@ if (APPLE)
set(QmlDesignerPluginInstallPrefix "${IDE_PLUGIN_PATH}/QmlDesigner") set(QmlDesignerPluginInstallPrefix "${IDE_PLUGIN_PATH}/QmlDesigner")
endif() endif()
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-error=maybe-uninitialized>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=maybe-uninitialized>")
add_qtc_library(QmlDesignerUtils STATIC add_qtc_library(QmlDesignerUtils STATIC
DEPENDS DEPENDS