diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-24 13:14:53 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-08-28 16:12:17 +0200 |
commit | 6ceabeaf43a1a149bd85ecaaef729c037f0005fc (patch) | |
tree | 01a2ad9f8b22a7a511bf8b82295a6267e04f2d4b /sal | |
parent | 1bf32a4ba186fd022ade3b3c365e42d5537daf91 (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>
(cherry picked from commit 5e3af4aec40531b490950da5ed49342a01c1477b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172462
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/byteseq.cxx | 7 |
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 ) |