提交 f41b9213 编写于 作者: B Behdad Esfahbod

Fix fallthrough compiler warning with gcc >= 7

Fixes https://github.com/harfbuzz/harfbuzz/issues/755
上级 b7b7f0ac
...@@ -154,6 +154,9 @@ extern "C" void hb_free_impl(void *ptr); ...@@ -154,6 +154,9 @@ extern "C" void hb_free_impl(void *ptr);
#if defined(__clang__) && __cplusplus >= 201103L #if defined(__clang__) && __cplusplus >= 201103L
/* clang's fallthrough annotations are only available starting in C++11. */ /* clang's fallthrough annotations are only available starting in C++11. */
# define HB_FALLTHROUGH [[clang::fallthrough]] # define HB_FALLTHROUGH [[clang::fallthrough]]
#elif __GNUC__ >= 7
/* GNU fallthrough attribute is available from GCC7 */
# define HB_FALLTHROUGH __attribute__((fallthrough))
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
/* /*
* MSVC's __fallthrough annotations are checked by /analyze (Code Analysis): * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册