summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-01 09:22:08 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-01 14:47:03 +0200
commit020d72fb85dac7a52eacb29731b8f2d536a2892d (patch)
treedd759a6931221d9691758f2f38f4ffd66de1fb00
parent737854f3c5131d3a64803edc0802dbbc07aa4405 (diff)
WaE: SwNodeIndex GCC12 spurious -Werror=dangling-pointer=
I see this with gcc 13 too Change-Id: I63aed9a3bdc5bec7f96474145fd2ba30156741cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152478 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sw/inc/ndindex.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index d700ac11c2f0..775546597500 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -36,12 +36,12 @@ class SAL_WARN_UNUSED SW_DLLPUBLIC SwNodeIndex final : public sw::Ring<SwNodeInd
SwNodes& rNodes = GetNodes();
if(!rNodes.m_vIndices)
{
-#if defined(__GNUC__) && __GNUC__ == 12
+#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
rNodes.m_vIndices = this;
-#if defined(__GNUC__) && __GNUC__ == 12
+#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13)
#pragma GCC diagnostic pop
#endif
}