From 936fc527cbb0f0e49cfaeb23c7633ea26aa46f23 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Fri, 8 May 2026 19:12:11 +0200 Subject: [PATCH] Compilation warning fix for imgui with clang (Linux); -Wnontrivial-memcall ignored --- CMakeLists.txt | 1 + src/Navigator.cpp | 7 +++++++ src/Toolkit/ImGuiToolkit.cpp | 7 +++++++ src/UserInterfaceManager.cpp | 7 +++++++ src/Window/OutputPreviewWindow.cpp | 7 +++++++ src/Window/SourceControlWindow.cpp | 7 +++++++ src/Window/WorkspaceWindow.cpp | 7 +++++++ 7 files changed, 43 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48afed4..ea8a484 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,6 +486,7 @@ set(IMGUI_SRCS add_library(IMGUI "${IMGUI_SRCS}") target_compile_definitions(IMGUI PRIVATE "IMGUI_IMPL_OPENGL_LOADER_GLAD") target_compile_definitions(IMGUI PRIVATE "IMGUI_USE_STB_SPRINTF") +target_compile_options(IMGUI PRIVATE "-Wno-nontrivial-memcall") message(STATUS "Compiling 'Dear ImGui' from https://github.com/ocornut/imgui.git -- ${IMGUI_INCLUDE_DIRS}") # diff --git a/src/Navigator.cpp b/src/Navigator.cpp index 6dbe99c..43ac64b 100644 --- a/src/Navigator.cpp +++ b/src/Navigator.cpp @@ -27,7 +27,14 @@ #include "IconsFontAwesome5.h" #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #include "defines.h" #include "Settings.h" diff --git a/src/Toolkit/ImGuiToolkit.cpp b/src/Toolkit/ImGuiToolkit.cpp index d66dc3a..f071c96 100644 --- a/src/Toolkit/ImGuiToolkit.cpp +++ b/src/Toolkit/ImGuiToolkit.cpp @@ -41,7 +41,14 @@ #include "SystemToolkit.h" #include "ImGuiToolkit.h" +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif bool tooltips_enabled = true; unsigned int textureicons = 0; diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index c1ed99a..72e0297 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -37,7 +37,14 @@ // ImGui #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #include "imgui_impl_glfw.h" #include "imgui_impl_opengl3.h" diff --git a/src/Window/OutputPreviewWindow.cpp b/src/Window/OutputPreviewWindow.cpp index a82d948..cdcdeab 100644 --- a/src/Window/OutputPreviewWindow.cpp +++ b/src/Window/OutputPreviewWindow.cpp @@ -25,7 +25,14 @@ #include "IconsFontAwesome5.h" #include "Toolkit/ImGuiToolkit.h" #include "imgui.h" +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #include "defines.h" #include "Log.h" diff --git a/src/Window/SourceControlWindow.cpp b/src/Window/SourceControlWindow.cpp index 04f497e..642dac8 100644 --- a/src/Window/SourceControlWindow.cpp +++ b/src/Window/SourceControlWindow.cpp @@ -31,7 +31,14 @@ #include "Timeline.h" #include "gst/gstclock.h" #include "imgui.h" +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #include "defines.h" #include "Log.h" diff --git a/src/Window/WorkspaceWindow.cpp b/src/Window/WorkspaceWindow.cpp index c43071f..6224882 100644 --- a/src/Window/WorkspaceWindow.cpp +++ b/src/Window/WorkspaceWindow.cpp @@ -20,7 +20,14 @@ #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnontrivial-memcall" +#endif #include "imgui_internal.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #include "defines.h" #include "WorkspaceWindow.h"