summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/buildhex.h3
-rw-r--r--src/utils/chatutils_unittest.cc3
-rw-r--r--src/utils/copynpaste.cpp9
-rw-r--r--src/utils/dumplibs.cpp4
-rw-r--r--src/utils/dumplibs_unittest.cc4
-rw-r--r--src/utils/process.cpp6
-rw-r--r--src/utils/sdl2helper.cpp3
-rw-r--r--src/utils/sdl2helper.h3
-rw-r--r--src/utils/sdlcheckutils.cpp3
-rw-r--r--src/utils/sdlhelper.cpp3
-rw-r--r--src/utils/sdlhelper.h3
-rw-r--r--src/utils/sdlpixel.h3
-rw-r--r--src/utils/sdlsharedhelper.cpp3
-rw-r--r--src/utils/timer.cpp3
14 files changed, 53 insertions, 0 deletions
diff --git a/src/utils/buildhex.h b/src/utils/buildhex.h
index ac9773070..cf9ab4591 100644
--- a/src/utils/buildhex.h
+++ b/src/utils/buildhex.h
@@ -23,9 +23,12 @@
#include "localconsts.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#ifndef SDL_BIG_ENDIAN
#include <SDL_endian.h>
#endif // SDL_BYTEORDER
+#pragma GCC diagnostic pop
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define buildHex(a, b, c, d) \
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index d23e1331f..b6e735d75 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -46,9 +46,12 @@
#include "resources/resourcemanager/resourcemanager.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#ifndef USE_SDL2
#include <SDL.h>
#endif // USE_SDL2
+#pragma GCC diagnostic pop
#include "debug.h"
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 8e3537734..0fdbf0652 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -38,7 +38,10 @@
#include "debug.h"
#ifdef USE_SDL2
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_clipboard.h>
+#pragma GCC diagnostic pop
#else // USE_SDL2
@@ -52,12 +55,18 @@
#include "utils/sdlhelper.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_syswm.h>
+#pragma GCC diagnostic pop
#include <unistd.h>
#elif defined __native_client__
#include "utils/naclmessages.h"
#elif defined WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_syswm.h>
+#pragma GCC diagnostic pop
#endif // defined(__APPLE__)
#endif // USE_SDL2
diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp
index e08db3645..d1f87f987 100644
--- a/src/utils/dumplibs.cpp
+++ b/src/utils/dumplibs.cpp
@@ -25,6 +25,8 @@
#include "utils/stringutils.h"
#include <png.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_image.h>
#include <SDL_mixer.h>
PRAGMACLANG6GCC(GCC diagnostic push)
@@ -32,6 +34,8 @@ PRAGMACLANG6GCC(GCC diagnostic ignored "-Wold-style-cast")
#include <SDL_net.h>
PRAGMACLANG6GCC(GCC diagnostic pop)
#include <SDL_ttf.h>
+#pragma GCC diagnostic pop
+
#include <zlib.h>
#include <curl/curl.h>
diff --git a/src/utils/dumplibs_unittest.cc b/src/utils/dumplibs_unittest.cc
index 66a272b8e..eb163aa7b 100644
--- a/src/utils/dumplibs_unittest.cc
+++ b/src/utils/dumplibs_unittest.cc
@@ -25,6 +25,8 @@
#include "utils/delete2.h"
#include "utils/stringutils.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_image.h>
#include <SDL_mixer.h>
PRAGMACLANG6GCC(GCC diagnostic push)
@@ -32,6 +34,8 @@ PRAGMACLANG6GCC(GCC diagnostic ignored "-Wold-style-cast")
#include <SDL_net.h>
PRAGMACLANG6GCC(GCC diagnostic pop)
#include <SDL_ttf.h>
+#pragma GCC diagnostic pop
+
#include <zlib.h>
#include "debug.h"
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index 56eaff27e..e79b8e3b7 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -24,11 +24,14 @@
#include "localconsts.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#ifdef USE_SDL2
#ifdef ANDROID
#include <SDL_system.h>
#endif // ANDROID
#endif // USE_SDL2
+#pragma GCC diagnostic pop
#include "debug.h"
@@ -258,7 +261,10 @@ bool openBrowser(std::string url)
#elif defined ANDROID
#include "utils/stringutils.h"
#ifndef USE_SDL2
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_screenkeyboard.h>
+#pragma GCC diagnostic pop
#endif // USE_SDL2
bool openBrowser(std::string url)
diff --git a/src/utils/sdl2helper.cpp b/src/utils/sdl2helper.cpp
index 6ed8e0984..97ff70f3a 100644
--- a/src/utils/sdl2helper.cpp
+++ b/src/utils/sdl2helper.cpp
@@ -26,7 +26,10 @@
#include "utils/stringutils.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_syswm.h>
+#pragma GCC diagnostic pop
#include "debug.h"
diff --git a/src/utils/sdl2helper.h b/src/utils/sdl2helper.h
index 5b95d6ebf..1d809a781 100644
--- a/src/utils/sdl2helper.h
+++ b/src/utils/sdl2helper.h
@@ -26,7 +26,10 @@
#include "localconsts.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_thread.h>
+#pragma GCC diagnostic pop
struct SDL_Surface;
struct SDL_SysWMinfo;
diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp
index 1b622edde..86e5363b0 100644
--- a/src/utils/sdlcheckutils.cpp
+++ b/src/utils/sdlcheckutils.cpp
@@ -29,8 +29,11 @@
#include <map>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_image.h>
#include <SDL_ttf.h>
+#pragma GCC diagnostic pop
#include "debug.h"
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index 261c09026..58fa7f59b 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -30,8 +30,11 @@
#include "utils/glxhelper.h"
#endif // defined(USE_X11) && defined(USE_OPENGL)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_syswm.h>
#include <SDL_video.h>
+#pragma GCC diagnostic pop
#include "debug.h"
diff --git a/src/utils/sdlhelper.h b/src/utils/sdlhelper.h
index 831473adc..2e9f2930d 100644
--- a/src/utils/sdlhelper.h
+++ b/src/utils/sdlhelper.h
@@ -28,7 +28,10 @@ UTILS_SDL2HELPER_H
#else
#include "utils/stringvector.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_thread.h>
+#pragma GCC diagnostic pop
#include "localconsts.h"
diff --git a/src/utils/sdlpixel.h b/src/utils/sdlpixel.h
index 455702757..e2d3d3083 100644
--- a/src/utils/sdlpixel.h
+++ b/src/utils/sdlpixel.h
@@ -66,7 +66,10 @@
#include "gui/color.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL.h>
+#pragma GCC diagnostic pop
#ifndef SDL_BYTEORDER
#error missing SDL_endian.h
diff --git a/src/utils/sdlsharedhelper.cpp b/src/utils/sdlsharedhelper.cpp
index f3c1ace7d..a030c7a61 100644
--- a/src/utils/sdlsharedhelper.cpp
+++ b/src/utils/sdlsharedhelper.cpp
@@ -27,7 +27,10 @@
#include <ppapi_simple/ps.h>
#endif // __native_client__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_events.h>
+#pragma GCC diagnostic pop
#include "debug.h"
diff --git a/src/utils/timer.cpp b/src/utils/timer.cpp
index 0233541e9..14c17adbc 100644
--- a/src/utils/timer.cpp
+++ b/src/utils/timer.cpp
@@ -22,7 +22,10 @@
#include "const/utils/timer.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow")
#include <SDL_timer.h>
+#pragma GCC diagnostic pop
#include <climits>