From 713e034d95f6cc8a57ca504d52cb4f60da6359d9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 3 Dec 2022 15:12:20 +0100 Subject: [PATCH] Backends: OpenGL3: Fix for zealous warning. (#5947) Consider moving to imgui_impl_opengl3_loader.h ? --- backends/imgui_impl_opengl3.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp index 5f5bb4272..c98110d82 100644 --- a/backends/imgui_impl_opengl3.cpp +++ b/backends/imgui_impl_opengl3.cpp @@ -110,6 +110,10 @@ #pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast #pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness #endif +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types +#endif // GL includes #if defined(IMGUI_IMPL_OPENGL_ES2) @@ -885,6 +889,9 @@ void ImGui_ImplOpenGL3_DestroyDeviceObjects() ImGui_ImplOpenGL3_DestroyFontsTexture(); } +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif #if defined(__clang__) #pragma clang diagnostic pop #endif