From 00842d18e498c159e7b963878f6352973ff6a931 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 24 Jan 2015 11:30:40 +0100 Subject: [PATCH] Speculative GCC warning fix (again) --- imgui.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 1994ce9a..a056870f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -331,6 +331,9 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" // warning : declaration requires a global destructor // similar to above, not sure what the exact difference it. #pragma clang diagnostic ignored "-Wsign-conversion" // warning : implicit conversion changes signedness // #endif +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used +#endif //------------------------------------------------------------------------- // STB libraries implementation @@ -352,10 +355,6 @@ namespace IMGUI_STB_NAMESPACE #pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wmissing-prototypes" #endif -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif #define STBRP_ASSERT(x) IM_ASSERT(x) #ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION @@ -380,9 +379,6 @@ namespace IMGUI_STB_NAMESPACE #ifdef __clang__ #pragma clang diagnostic pop #endif -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif #ifdef IMGUI_STB_NAMESPACE } // namespace ImStb