[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sal/rtl
Stephan Bergmann
sbergman at redhat.com
Wed Jan 17 19:12:35 UTC 2018
sal/rtl/alloc_arena.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit b4f26014c380ecc3d93875a161747da489db72e4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed May 3 10:12:45 2017 +0200
Work around GCC 7 mis-feature
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354> "Poor support to silence
-Wformat-truncation=1"
Change-Id: I486f8a3a12896df3d9506f53bca44a318e23c991
(cherry picked from commit 1b12d5ecb1be36267534e0b980d7c53d50645511)
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 6e0a55dbb886..d6080c93a9f6 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -671,6 +671,10 @@ rtl_arena_destructor (void * obj)
/** rtl_arena_activate()
*/
+#if defined __GNUC__ && __GNUC__ >= 7
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-truncation"
+#endif
rtl_arena_type *
rtl_arena_activate (
rtl_arena_type * arena,
@@ -718,6 +722,9 @@ rtl_arena_activate (
{
size = i * arena->m_quantum;
(void) snprintf (namebuf, sizeof(namebuf), "%s_%" SAL_PRIuUINTPTR, arena->m_name, size);
+#if defined __GNUC__ && __GNUC__ >= 7
+#pragma GCC diagnostic pop
+#endif
arena->m_qcache_ptr[i - 1] = rtl_cache_create(namebuf, size, 0, nullptr, nullptr, nullptr, nullptr, arena, RTL_CACHE_FLAG_QUANTUMCACHE);
}
}
More information about the Libreoffice-commits
mailing list