From d379e86e4a50ad19f243e4713c6c400279e5fd49 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 23 May 2024 11:13:59 +1000 Subject: Suppress some warnings from g++ 14.1 where a UTF-8 character has a maximum length of 4 (UTF8MaxBytes) but the compiler doesn't see this is enforced. --- src/Document.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Document.cxx b/src/Document.cxx index 7c5eb6fa8..b7b5b2427 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -52,6 +52,11 @@ using namespace Scintilla; using namespace Scintilla::Internal; +#if defined(__GNUC__) && !defined(__clang__) +// False warnings from g++ 14.1 for UTF-8 accumulation code where UTF8MaxBytes allocated. +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + LexInterface::LexInterface(Document *pdoc_) noexcept : pdoc(pdoc_), performingStyle(false) { } -- cgit v1.2.3