From dda65b8fb01ac399af8fa44085db3cd9ab6cef2b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 28 Apr 2016 19:32:40 +0300 Subject: Add workaround for fix compilation warnings in SDL2. --- src/utils/physfsrwops.h | 8 ++++++++ src/utils/sdl2helper.h | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'src/utils') diff --git a/src/utils/physfsrwops.h b/src/utils/physfsrwops.h index 4c3c05988..e1226f3b4 100644 --- a/src/utils/physfsrwops.h +++ b/src/utils/physfsrwops.h @@ -25,6 +25,14 @@ #ifndef UTILS_PHYSFSRWOPS_H #define UTILS_PHYSFSRWOPS_H +#ifdef USE_SDL2 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wswitch-default" +#endif +#include +#ifdef USE_SDL2 +#pragma GCC diagnostic pop +#endif #include #include "utils/physfstools.h" diff --git a/src/utils/sdl2helper.h b/src/utils/sdl2helper.h index d1b918b51..7cf471542 100644 --- a/src/utils/sdl2helper.h +++ b/src/utils/sdl2helper.h @@ -24,6 +24,10 @@ #ifdef USE_SDL2 #include "utils/stringvector.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wswitch-default" +#include +#pragma GCC diagnostic pop #include #include "localconsts.h" -- cgit v1.2.3-60-g2f50