aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 15:55:33 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-11-19 20:11:56 +0000
commitcbb11c57773713ca18384a6c45e5dcd96330850a (patch)
treef894e6e687d7204cedf7dad0b7fa6ccd9ccdc74e
parent89cdd5575bba856035946926f5575705ebd6c1b7 (diff)
Silence a GCC 8 warning in qv4engine
qtdeclarative/src/qml/jsruntime/qv4engine.cpp:913:78: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct QV4::Property’ with no trivial copy-assignment [-Werror=class-memaccess] memcpy(argumentsAccessors, oldAccessors, oldSize*sizeof(Property)); Change-Id: I6e3d6a1a26fda33aa47c315a183edba9dcd0c0b9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit d0c1b1e8f9dcbde14154029f7df0acc3888f675a) Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 0d3f29d089..accf58d4f3 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -916,7 +916,7 @@ void ExecutionEngine::requireArgumentsAccessors(int n)
nArgumentsAccessors = qMax(8, n);
argumentsAccessors = new Property[nArgumentsAccessors];
if (oldAccessors) {
- memcpy(argumentsAccessors, oldAccessors, oldSize*sizeof(Property));
+ memcpy(static_cast<void *>(argumentsAccessors), static_cast<const void *>(oldAccessors), oldSize*sizeof(Property));
delete [] oldAccessors;
}
ExecutionContext *global = rootContext();