summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/streaming/memorystream.cxx3
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;
}