summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-03 10:12:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-03 10:12:45 +0200
commit1b12d5ecb1be36267534e0b980d7c53d50645511 (patch)
tree4bcb82e90f70ae7d9a57e2b48fde96762e638619 /sal
parentsplit out the non-translatable strings (diff)
downloadcore-1b12d5ecb1be36267534e0b980d7c53d50645511.tar.gz
core-1b12d5ecb1be36267534e0b980d7c53d50645511.zip
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
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/alloc_arena.cxx7
1 files changed, 7 insertions, 0 deletions
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);
}
}