From df02d9a8e299d864fbd287f342999a4792dafc8c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 8 Nov 2018 17:36:08 +0000 Subject: [PATCH] libunibreak - warn - add fallthrough attributes to minimize warnings --- src/static_libs/libunibreak/wordbreak.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/static_libs/libunibreak/wordbreak.c b/src/static_libs/libunibreak/wordbreak.c index aece4b3c45..017e0fd091 100644 --- a/src/static_libs/libunibreak/wordbreak.c +++ b/src/static_libs/libunibreak/wordbreak.c @@ -209,7 +209,10 @@ static void set_wordbreaks( posLast = posCur; break; } - /* Fall off */ +#if __has_attribute(fallthrough) + __attribute__((fallthrough)); +#endif + /* Fall off */ case WBP_Newline: /* WB3a,3b */ @@ -322,7 +325,10 @@ static void set_wordbreaks( wbcSeqStart = wbcCur; posLast = posCur; } - /* No break on purpose */ +#if __has_attribute(fallthrough) + __attribute__((fallthrough)); +#endif + /* No break on purpose */ case WBP_MidNumLet: if (((wbcLast == WBP_ALetter) || (wbcLast == WBP_Hebrew_Letter)) || /* WB6,7 */