diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-05-22 11:06:43 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2022-05-23 09:42:24 +0200 |
commit | 5cf5df83aad9c9c97060043727337bdef8af10ec (patch) | |
tree | cd3af3330139c9f0e0f6fcd8e80f9a68f506ecc6 /comphelper | |
parent | 42e88e3b34faf7b5fea116c91aa85a0c4043d359 (diff) |
comphelper: -Werror=class-memaccess
Change-Id: Ia38274fac70618902f562fec657ad9cccfcf8cb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134735
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/streaming/memorystream.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 7edfe7a78ce0..ea1a955cb4d4 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -218,7 +218,8 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) NoInitInt8* pData = &(*maData.begin()); NoInitInt8* pCursor = &(pData[mnCursor]); - memcpy( pCursor, aData.getConstArray(), nBytesToWrite ); + // cast to avoid -Werror=class-memaccess + memcpy(static_cast<void*>(pCursor), aData.getConstArray(), nBytesToWrite); mnCursor += nBytesToWrite; } |