summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-11-27 05:36:42 +0300
committerjak1 <mike.wollmann@gmail.com>2021-03-11 20:57:13 +0000
commit7124d95d082d77b7e00447a4ecad094e575e8fa9 (patch)
treec609a913d6ac659e08b1b6d81446e4af984773d2 /src/render
parent54b88d05bbbe616c05814d57cc4f86de649ce98c (diff)
downloadplus-7124d95d082d77b7e00447a4ecad094e575e8fa9.tar.gz
plus-7124d95d082d77b7e00447a4ecad094e575e8fa9.tar.bz2
plus-7124d95d082d77b7e00447a4ecad094e575e8fa9.tar.xz
plus-7124d95d082d77b7e00447a4ecad094e575e8fa9.zip
Silence warning -Wredundant-decls in SDL 1.2 code
Also switch in debug build script to gcc 10.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/mobileopengl2graphics.h7
-rw-r--r--src/render/mobileopenglgraphics.h7
-rw-r--r--src/render/modernopenglgraphics.h7
-rw-r--r--src/render/normalopenglgraphics.h7
-rw-r--r--src/render/nullopenglgraphics.h7
-rw-r--r--src/render/opengl/mgltypes.h10
-rw-r--r--src/render/safeopenglgraphics.h7
-rw-r--r--src/render/vertexes/openglgraphicsvertexes.h4
8 files changed, 56 insertions, 0 deletions
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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#ifdef HAVE_GLEXT
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+PRAGMA45(GCC diagnostic pop)
#endif // HAVE_GLEXT
#ifdef __native_client__
#include <GL/Regal.h>
@@ -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 <GL/glext.h>
+PRAGMA45(GCC diagnostic pop)
// #error missing include <GL/glext.h>
#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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#if defined(__APPLE__)
#include <OpenGL/glext.h>
#elif !defined(__native_client__)
+PRAGMA45(GCC diagnostic push)
+PRAGMA45(GCC diagnostic ignored "-Wredundant-decls")
#include <GL/glext.h>
+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 <SDL_opengl.h>
+PRAGMA45(GCC diagnostic pop)
PRAGMA48(GCC diagnostic pop)
#endif // ANDROID