[Libreoffice-commits] core.git: sal/rtl
Stephan Bergmann
sbergman at redhat.com
Wed May 3 08:14:05 UTC 2017
sal/rtl/alloc_arena.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 1b12d5ecb1be36267534e0b980d7c53d50645511
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
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 1459c06816d6..f3ac99ea349c 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -668,6 +668,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,
@@ -715,6 +719,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