From 701a047ac0759c12350f682f8308b4ecbec4be68 Mon Sep 17 00:00:00 2001 From: DKing <15340687+DKingAlpha@users.noreply.github.com> Date: Fri, 29 Sep 2023 01:33:27 +0800 Subject: [PATCH] Fonts: Fix clang compiling warning & error with freetype + lunasvg (#6873, #6842, #6591) Amend d6360c1 --- misc/freetype/imgui_freetype.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/freetype/imgui_freetype.cpp b/misc/freetype/imgui_freetype.cpp index facb9c9e..2e855de0 100644 --- a/misc/freetype/imgui_freetype.cpp +++ b/misc/freetype/imgui_freetype.cpp @@ -63,8 +63,10 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wsubobject-linkage" // warning: 'xxxx' has a field 'xxxx' whose type uses the anonymous namespace #endif +#endif //------------------------------------------------------------------------- // Data @@ -840,7 +842,7 @@ static FT_Error ImGuiLunasvgPortInit(FT_Pointer* _state) static void ImGuiLunasvgPortFree(FT_Pointer* _state) { - IM_DELETE(*(LunasvgPortState*)_state); + IM_DELETE(*(LunasvgPortState**)_state); } static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state)