From f29d4876505fd3fd8c5d2c115e2a790409b02289 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Feb 2017 17:21:59 +0300 Subject: Fix compilation with gcc version below 4.6. --- src/input/keyboardconfig.h | 6 +++--- src/localconsts.h | 6 +++--- src/logger.h | 6 +++--- src/net/sdltcpnet.h | 6 +++--- src/resources/screenshothelper.h | 6 +++--- src/soundmanager.h | 6 +++--- src/utils/buildhex.h | 6 +++--- src/utils/dumplibs.cpp | 6 +++--- src/utils/physfsrwops.h | 6 +++--- src/utils/physfstools.h | 8 +++++--- src/utils/sdl2helper.h | 7 ++++--- 11 files changed, 36 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h index a6f5ba310..31cae27bb 100644 --- a/src/input/keyboardconfig.h +++ b/src/input/keyboardconfig.h @@ -24,15 +24,15 @@ #define INPUT_KEYBOARDCONFIG_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/localconsts.h b/src/localconsts.h index 08623b2b5..072b063d0 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -294,12 +294,12 @@ #endif // ENABLE_CHECKS #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #if SDL_VERSION_ATLEAST(2, 0, 0) diff --git a/src/logger.h b/src/logger.h index a0d95d432..557116df2 100644 --- a/src/logger.h +++ b/src/logger.h @@ -24,15 +24,15 @@ #define LOGGER_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/net/sdltcpnet.h b/src/net/sdltcpnet.h index 194438782..9469b7768 100644 --- a/src/net/sdltcpnet.h +++ b/src/net/sdltcpnet.h @@ -22,15 +22,15 @@ #define NET_SDLTCPNET_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/resources/screenshothelper.h b/src/resources/screenshothelper.h index e37db92ed..5f525c03c 100644 --- a/src/resources/screenshothelper.h +++ b/src/resources/screenshothelper.h @@ -24,15 +24,15 @@ #define RESOURCES_SCREENSHOTHELPER_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/soundmanager.h b/src/soundmanager.h index dae6ba0eb..5ac79a815 100644 --- a/src/soundmanager.h +++ b/src/soundmanager.h @@ -24,15 +24,15 @@ #define SOUNDMANAGER_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/utils/buildhex.h b/src/utils/buildhex.h index 0e728fed0..3ee72d28c 100644 --- a/src/utils/buildhex.h +++ b/src/utils/buildhex.h @@ -22,15 +22,15 @@ #define UTILS_BUILDHEX_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #ifndef SDL_BIG_ENDIAN diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp index 6b99cd088..4efd647d8 100644 --- a/src/utils/dumplibs.cpp +++ b/src/utils/dumplibs.cpp @@ -31,10 +31,10 @@ PRAGMACLANG6(GCC diagnostic ignored "-Wold-style-cast") #include PRAGMACLANG6(GCC diagnostic pop) #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wlong-long") #include -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #include #include diff --git a/src/utils/physfsrwops.h b/src/utils/physfsrwops.h index 44e174814..f3eefe0a5 100644 --- a/src/utils/physfsrwops.h +++ b/src/utils/physfsrwops.h @@ -26,15 +26,15 @@ #define UTILS_PHYSFSRWOPS_H #ifdef USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) #ifdef USE_SDL2 -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include diff --git a/src/utils/physfstools.h b/src/utils/physfstools.h index f65b9c344..3db197927 100644 --- a/src/utils/physfstools.h +++ b/src/utils/physfstools.h @@ -21,10 +21,12 @@ #ifndef UTILS_PHYSFSTOOLS_H #define UTILS_PHYSFSTOOLS_H -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" +#include "localconsts.h" + +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wlong-long") #include -#pragma GCC diagnostic pop +PRAGMA45(GCC diagnostic pop) #include diff --git a/src/utils/sdl2helper.h b/src/utils/sdl2helper.h index 8e1333e16..412701a02 100644 --- a/src/utils/sdl2helper.h +++ b/src/utils/sdl2helper.h @@ -24,13 +24,14 @@ #ifdef USE_SDL2 #include "utils/stringvector.h" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wswitch-default" +PRAGMA45(GCC diagnostic push) +PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #include #if !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) && !defined(SDL_stdinc_h) #error need include SDL_stdinc.h #endif // !defined(_SDL_stdinc_h) && !defined(SDL_stdinc_h_) -#pragma GCC diagnostic pop + +PRAGMA45(GCC diagnostic pop) #include #include "localconsts.h" -- cgit v1.2.3-60-g2f50