From f4e4ad6d2bfc71d93698b2bd81fcbab6ee46d918 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 8 Jul 2020 14:59:54 +0200 Subject: [PATCH] Silence some warnings about fallthrough src/corelib/text/qunicodetools.cpp:1243:13: warning: this statement may fall through [-Wimplicit-fallthrough=] src/corelib/text/qunicodetools.cpp:1247:55: warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: I441000db46cb6d85a5dcd0534ea2168b39a3f3bd Reviewed-by: Lars Knoll --- qmake/generators/win32/msvc_objectmodel.cpp | 3 ++- src/corelib/text/qunicodetools.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 15e13a1c32e..eacf9a0e5eb 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -1897,7 +1897,8 @@ bool VCMIDLTool::parseOption(const char* option) WarnAsError = _True; break; case 0x3582fde: // /align {N} - offset = 3; // Fallthrough + offset = 3; + Q_FALLTHROUGH(); case 0x0003510: // /Zp {N} switch (*(option+offset+4)) { case '1': diff --git a/src/corelib/text/qunicodetools.cpp b/src/corelib/text/qunicodetools.cpp index 61976ab9ca2..4f5ccb6fcc7 100644 --- a/src/corelib/text/qunicodetools.cpp +++ b/src/corelib/text/qunicodetools.cpp @@ -1242,11 +1242,11 @@ static int indic_nextSyllableBoundary(QChar::Script script, const ushort *s, int case StressMark: if (state == VowelMark) break; - // fall through + Q_FALLTHROUGH(); case VowelMark: if (state == Matra || state == LengthMark || state == IndependentVowel) break; - // fall through + Q_FALLTHROUGH(); case Matra: if (state == Consonant || state == Nukta) break;