Fixed/silenced various absurd GCC warnings from outer space (#626)

This commit is contained in:
ocornut
2016-05-04 23:28:16 +02:00
parent c1da3e354e
commit f22b6e1e09
2 changed files with 12 additions and 3 deletions

View File

@ -58,7 +58,7 @@ namespace IMGUI_STB_NAMESPACE
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4456) // declaration of 'xx' hides previous local declaration
#pragma warning (disable: 4456) // declaration of 'xx' hides previous local declaration
#endif
#ifdef __clang__
@ -68,6 +68,11 @@ namespace IMGUI_STB_NAMESPACE
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#endif
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits" // warning: comparison is always true due to limited range of data type [-Wtype-limits]
#endif
#define STBRP_ASSERT(x) IM_ASSERT(x)
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
#define STBRP_STATIC
@ -86,6 +91,10 @@ namespace IMGUI_STB_NAMESPACE
#endif
#include "stb_truetype.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif