From 7124d95d082d77b7e00447a4ecad094e575e8fa9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 27 Nov 2020 05:36:42 +0300 Subject: Silence warning -Wredundant-decls in SDL 1.2 code Also switch in debug build script to gcc 10. --- build/bmakedebug | 2 +- src/graphicsmanager.h | 7 +++++++ src/render/mobileopengl2graphics.h | 7 +++++++ src/render/mobileopenglgraphics.h | 7 +++++++ src/render/modernopenglgraphics.h | 7 +++++++ src/render/normalopenglgraphics.h | 7 +++++++ src/render/nullopenglgraphics.h | 7 +++++++ src/render/opengl/mgltypes.h | 10 ++++++++++ src/render/safeopenglgraphics.h | 7 +++++++ src/render/vertexes/openglgraphicsvertexes.h | 4 ++++ src/resources/fboinfo.h | 10 ++++++++++ src/resources/image/image.h | 7 +++++++ src/resources/openglimagehelper.h | 7 +++++++ src/resources/safeopenglimagehelper.h | 7 +++++++ 14 files changed, 95 insertions(+), 1 deletion(-) diff --git a/build/bmakedebug b/build/bmakedebug index 72f66c1e2..c80315be1 100755 --- a/build/bmakedebug +++ b/build/bmakedebug @@ -24,7 +24,7 @@ export CXXFLAGS="-pedantic -ggdb3 -O3 -pipe -ffast-math \ -std=gnu++2a \ -fno-var-tracking -Wno-attributes" -source ./tools/ci/flags/gcc8.sh +source ./tools/ci/flags/gcc10.sh autoreconf -i cd build/tmp diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h index 2811bc0ec..5d4c6d8b2 100644 --- a/src/graphicsmanager.h +++ b/src/graphicsmanager.h @@ -35,10 +35,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT // hack to hide warnings #undef GL_GLEXT_VERSION diff --git a/src/render/mobileopengl2graphics.h b/src/render/mobileopengl2graphics.h index 14d0eed18..41e77f16a 100644 --- a/src/render/mobileopengl2graphics.h +++ b/src/render/mobileopengl2graphics.h @@ -41,12 +41,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 0496de283..5b678c8a9 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -41,12 +41,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 4362ea20d..b9a40212c 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -42,12 +42,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 8d3b23180..92ead4bea 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -42,12 +42,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 597ea59c6..ae7834a18 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -41,12 +41,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/opengl/mgltypes.h b/src/render/opengl/mgltypes.h index 874e4c9ff..bf5a34fc7 100644 --- a/src/render/opengl/mgltypes.h +++ b/src/render/opengl/mgltypes.h @@ -37,10 +37,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT #ifdef __native_client__ #include @@ -50,7 +57,10 @@ PRAGMA48(GCC diagnostic pop) #else // defined(__APPLE__) #ifndef __glext_h_ // probably this include need for some os / libs +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) // #error missing include #endif // __glext_h_ #endif // defined(__APPLE__) diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index 55a1c8515..ca375025b 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -38,12 +38,19 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #if defined(__APPLE__) #include #elif !defined(__native_client__) +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/render/vertexes/openglgraphicsvertexes.h b/src/render/vertexes/openglgraphicsvertexes.h index 3bc7f7f52..32c176cf6 100644 --- a/src/render/vertexes/openglgraphicsvertexes.h +++ b/src/render/vertexes/openglgraphicsvertexes.h @@ -33,8 +33,12 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #define GL_GLEXT_LEGACY #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #endif // ANDROID diff --git a/src/resources/fboinfo.h b/src/resources/fboinfo.h index 5f47630c1..5dd3dbef0 100644 --- a/src/resources/fboinfo.h +++ b/src/resources/fboinfo.h @@ -34,10 +34,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT #if defined(__APPLE__) #include @@ -46,7 +53,10 @@ PRAGMA48(GCC diagnostic pop) #ifdef GL_GLEXT_VERSION #undef GL_GLEXT_VERSION #endif +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // defined(__APPLE__) #endif // ANDROID diff --git a/src/resources/image/image.h b/src/resources/image/image.h index b15ff7d33..c8b1e9150 100644 --- a/src/resources/image/image.h +++ b/src/resources/image/image.h @@ -42,10 +42,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT #endif // ANDROID #endif // USE_OPENGL diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h index 173f53bb7..a14956ac7 100644 --- a/src/resources/openglimagehelper.h +++ b/src/resources/openglimagehelper.h @@ -46,10 +46,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT #endif // ANDROID diff --git a/src/resources/safeopenglimagehelper.h b/src/resources/safeopenglimagehelper.h index 7b2098b11..31ff4dac4 100644 --- a/src/resources/safeopenglimagehelper.h +++ b/src/resources/safeopenglimagehelper.h @@ -46,10 +46,17 @@ #endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +// ignore -Wredundant-decls for SDL 1.2 +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) PRAGMA48(GCC diagnostic pop) #ifdef HAVE_GLEXT +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") #include +PRAGMA45(GCC diagnostic pop) #endif // HAVE_GLEXT #endif // ANDROID -- cgit v1.2.3-60-g2f50