summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-11-22 22:28:51 +0100
committerJulien Nabet <serval2412@yahoo.fr>2019-11-22 23:09:35 +0100
commit2679c012115424e2728cfe79f7c6b5b243739b4e (patch)
tree44a9a88bdf2f86e3a9aba8cb4545f47a22b18fa9
parent6636712f5d7929aaffec96736d1f45dd9a402bdc (diff)
GCC trunk towards GCC 9 still emits a bogus -Wstringop-truncation
Change-Id: I14ff82099107302f5e99f22735c37901f68934e9 Reviewed-on: https://gerrit.libreoffice.org/83537 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--vcl/source/fontsubset/cff.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index c1b4724d3db0..208264e7346a 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1631,7 +1631,14 @@ void Type1Emitter::setSubsetName( const char* pSubsetName)
{
maSubsetName[0] = '\0';
if( pSubsetName)
+#if defined __GNUC__ && (__GNUC__ == 8 || __GNUC__ == 9) && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
strncpy( maSubsetName, pSubsetName, sizeof(maSubsetName));
+#if defined __GNUC__ && (__GNUC__ == 8 || __GNUC__ == 9) && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
maSubsetName[sizeof(maSubsetName)-1] = '\0';
}