1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Warnings: Add warning-wrangling header

This commit is contained in:
reuk 2020-03-21 16:07:27 +00:00
parent 175644e8c1
commit 5f348c3040
93 changed files with 581 additions and 903 deletions

View file

@ -19,10 +19,7 @@
namespace juce
{
#if JUCE_MSVC
#pragma warning (push)
#pragma warning (disable: 4365)
#endif
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4365)
namespace jpeglibNamespace
{
@ -31,37 +28,16 @@ namespace jpeglibNamespace
typedef unsigned char boolean;
#endif
#if JUCE_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wcast-align"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning ("-Wimplicit-fallthrough")
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#if __has_warning("-Wcomma")
#pragma clang diagnostic ignored "-Wcomma"
#endif
#endif
#if JUCE_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#if __GNUC__ > 5
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif
#endif
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wdeprecated-register",
"-Wsign-conversion",
"-Wcast-align",
"-Wswitch-enum",
"-Wswitch-default",
"-Wimplicit-fallthrough",
"-Wzero-as-null-pointer-constant",
"-Wshift-negative-value",
"-Wcomma")
#define JPEG_INTERNALS
#undef FAR
@ -136,13 +112,7 @@ namespace jpeglibNamespace
#include "jpglib/jutils.c"
#include "jpglib/transupp.c"
#if JUCE_CLANG
#pragma clang diagnostic pop
#endif
#if JUCE_GCC
#pragma GCC diagnostic pop
#endif
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#else
#define JPEG_INTERNALS
#undef FAR
@ -153,9 +123,7 @@ namespace jpeglibNamespace
#undef max
#undef min
#if JUCE_MSVC
#pragma warning (pop)
#endif
JUCE_END_IGNORE_WARNINGS_MSVC
//==============================================================================
namespace JPEGHelpers