From 83013d19ca77f8ff736ed7b9e85d2c7b3250476a Mon Sep 17 00:00:00 2001 From: E14 <1640391+E14@users.noreply.github.com> Date: Fri, 13 Sep 2019 15:56:56 +0200 Subject: GCC: Added pragma to ignore fallthrough warnings within Unicode Inc. code (#4392) --- src/StringUtils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp index ec387437d..438f1864e 100644 --- a/src/StringUtils.cpp +++ b/src/StringUtils.cpp @@ -414,6 +414,10 @@ AString UnicodeCharToUtf8(unsigned a_UnicodeChar) +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#endif // UTF-8 conversion code adapted from: // https://stackoverflow.com/questions/2867123/convert-utf-16-to-utf-8-under-windows-and-linux-in-c @@ -610,6 +614,9 @@ are equivalent to the following loop: //////////////////////////////////////////////////////////////////////////////// // End of Unicode, Inc.'s code / information //////////////////////////////////////////////////////////////////////////////// +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif -- cgit v1.2.3