From 5cf5df83aad9c9c97060043727337bdef8af10ec Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sun, 22 May 2022 11:06:43 +0200 Subject: comphelper: -Werror=class-memaccess Change-Id: Ia38274fac70618902f562fec657ad9cccfcf8cb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134735 Tested-by: Jenkins Reviewed-by: Julien Nabet --- comphelper/source/streaming/memorystream.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'comphelper') 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(pCursor), aData.getConstArray(), nBytesToWrite); mnCursor += nBytesToWrite; } -- cgit