summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-24 13:14:53 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-24 14:58:09 +0100
commit5e3af4aec40531b490950da5ed49342a01c1477b (patch)
tree1b23988a42a50dcd09c98ffc87c69a7836d963e7 /sal
parent2d514b422257ccf2b53215ee948dda2c9a476d37 (diff)
Silence new GCC 14 trunk -Werror=alloc-size
> sal/rtl/byteseq.cxx: In function ‘void rtl_byte_sequence_reference2One(sal_Sequence**)’: > sal/rtl/byteseq.cxx:63:20: error: allocation of insufficient size ‘8’ for type ‘sal_Sequence’ {aka ‘_sal_Sequence’} with size ‘12’ [-Werror=alloc-size] > 63 | pNew = static_cast<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE )); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I9d4081ed2938fffdf282c852250a3eed5f0d9e25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161269 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/byteseq.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx
index 3c4967d5456d..0084f3969812 100644
--- a/sal/rtl/byteseq.cxx
+++ b/sal/rtl/byteseq.cxx
@@ -60,7 +60,14 @@ void SAL_CALL rtl_byte_sequence_reference2One(
}
else
{
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Walloc-size"
+#endif
pNew = static_cast<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE ));
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 14
+#pragma GCC diagnostic pop
+#endif
}
if ( pNew != nullptr )