summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/localconsts.h3
-rw-r--r--src/resources/mapreader.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index 4b1616db1..455a0ba3c 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -183,12 +183,15 @@
#define PRAGMACLANG(str) _Pragma(#str)
#if CLANG_VERSION >= 30800
#define PRAGMACLANG6(str) _Pragma(#str)
+#define CLANG_FALLTHROUGH [[clang::fallthrough]];
#else // __clang_major__ >= 6
#define PRAGMACLANG6(str)
+#define CLANG_FALLTHROUGH
#endif // __clang_major__ >= 6
#else // __clang__
#define PRAGMACLANG(str)
#define PRAGMACLANG6(str)
+#define CLANG_FALLTHROUGH
#endif // __clang__
#ifdef __GNUC__
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index d60f18d03..e1383329f 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -141,9 +141,7 @@ int inflateMemory(unsigned char *restrict const in,
{
case Z_NEED_DICT:
ret = Z_DATA_ERROR;
-#ifdef __clang__
- [[clang::fallthrough]];
-#endif
+ CLANG_FALLTHROUGH
case Z_DATA_ERROR:
case Z_MEM_ERROR:
(void) inflateEnd(&strm);