hwpfilter/source/hstyle.cxx     |    4 ++--
 vcl/source/helper/strhelper.cxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e6870e7003a0edff39a8ec33453071fabff8294e
Author:     Julien Nabet <[email protected]>
AuthorDate: Sat Oct 25 12:56:03 2025 +0200
Commit:     Julien Nabet <[email protected]>
CommitDate: Sat Oct 25 14:44:06 2025 +0200

    [-Werror=stringop-truncation] with gcc 15
    
    Change-Id: I0dfaace18b0dc19ca1e2c6f11fcddb42e85ab761
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192969
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>

diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index e155a86e9728..3221f73f8624 100644
--- a/hwpfilter/source/hstyle.cxx
+++ b/hwpfilter/source/hstyle.cxx
@@ -68,14 +68,14 @@ void HWPStyle::SetName(int n, char const* name)
 
     if (name)
     {
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 16) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 15) && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-truncation"
 #endif
         auto const p = style[n].name;
         strncpy(p, name, MAXSTYLENAME);
         p[MAXSTYLENAME] = '
-#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 16) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 15) && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
     }
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 30c5bc0cf8ff..ca37dbf304cd 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -365,13 +365,13 @@ OString WhitespaceToSpace(std::string_view rLine)
     // there might be a space at beginning or end
     assert(pLeap > pBuffer);
     pLeap--;
-#if defined(__GNUC__) && __GNUC__ >= 12 && __GNUC__ <= 15
+#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13 || __GNUC__ == 14 
|| __GNUC__ == 15)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
     if( *pLeap == ' ' )
         *pLeap = 0;
-#if defined(__GNUC__) && __GNUC__ >= 12 && __GNUC__ <= 15
+#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13 || __GNUC__ == 14 
|| __GNUC__ == 15)
 #pragma GCC diagnostic pop
 #endif
     return *pBuffer == ' ' ? pBuffer+1 : pBuffer;

Reply via email to