From 205ed1edc60277c6ae8cc4383ab24535b36f7761 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 Sep 2016 04:41:33 +0300 Subject: Add some new flags for gcc snapshot and fix new warning. --- src/localconsts.h | 7 +++++++ src/resources/mapreader.cpp | 1 + 2 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/localconsts.h b/src/localconsts.h index 08f2efe40..3ae1c74e6 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -163,12 +163,19 @@ #endif // ENABLE_CILKPLUS #ifdef ADVGCC + #define const2 const #if GCC_VERSION >= 60000 #define PRAGMA6(str) _Pragma(#str) #else // GCC_VERSION > 60000 #define PRAGMA6(str) #endif // GCC_VERSION > 60000 +#if GCC_VERSION >= 70000 +#define A_FALLTHROUGH __attribute__ ((fallthrough)); +#else // GCC_VERSION > 70000 +#define A_FALLTHROUGH +#endif // GCC_VERSION > 70000 + #else // ADVGCC #define const2 #define PRAGMA6(str) diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index c4134e106..1427493ea 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -154,6 +154,7 @@ int inflateMemory(unsigned char *restrict const in, { case Z_NEED_DICT: ret = Z_DATA_ERROR; + A_FALLTHROUGH case Z_DATA_ERROR: case Z_MEM_ERROR: (void) inflateEnd(&strm); -- cgit v1.2.3-70-g09d2