hwpfilter/source/hstyle.cxx     |    4 ++--
 linguistic/source/lngsvcmgr.cxx |    4 ++--
 vcl/source/helper/strhelper.cxx |    4 ++--
 xmloff/source/text/txtflde.cxx  |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 294858f8ff546dc0d42e83745dc0ab937396f20c
Author:     Stephan Bergmann <stephan.bergm...@collabora.com>
AuthorDate: Thu Jul 24 08:21:37 2025 +0200
Commit:     Stephan Bergmann <stephan.bergm...@collabora.com>
CommitDate: Thu Jul 24 10:17:31 2025 +0200

    Some bugus warnings still hit with GCC 15
    
    ...at least with gcc-15.1.1-2.fc42.x86_64, when doing optimizing LO builds
    
    Change-Id: I5df92c8503a88727d31f8e1920a2cd744d3ab790
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188258
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com>

diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx
index 9a0040edcf08..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__ <= 14) && !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__ <= 14) && !defined __clang__
+#if defined __GNUC__ && (__GNUC__ >= 8 && __GNUC__ <= 15) && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
     }
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 24faa9814d4a..11cc7f7a9707 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -504,7 +504,7 @@ void LngSvcMgr::disposing(const lang::EventObject&)
     stopListening();
 }
 
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
@@ -521,7 +521,7 @@ LngSvcMgr::~LngSvcMgr()
     pAvailHyphSvcs.reset();
     pAvailThesSvcs.reset();
 }
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
 
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 6485a832841f..30c5bc0cf8ff 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__ == 13 || __GNUC__ == 14)
+#if defined(__GNUC__) && __GNUC__ >= 12 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
     if( *pLeap == ' ' )
         *pLeap = 0;
-#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13 || __GNUC__ == 14)
+#if defined(__GNUC__) && __GNUC__ >= 12 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
     return *pBuffer == ' ' ? pBuffer+1 : pBuffer;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index c0fb7aaac850..b74acff7fffb 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2264,12 +2264,12 @@ void 
XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations(
 
     // create used masters set (if none is used)
     if (bExportOnlyUsed)
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14 && __GNUC__ <= 15
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
         moUsedMasters.emplace();
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 14
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14 && __GNUC__ <= 15
 #pragma GCC diagnostic pop
 #endif
 }

Reply via email to