summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 15:57:38 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-11-19 20:11:47 +0000
commit3793a264b6eeecae5d4c44747fbe46c0d255a3c5 (patch)
treeab7ec38a78f758e1c9d4d13dcc3ee235c731d238
parente73089bee1c60ebaefdb4c4892ded12817139670 (diff)
Silence a GCC 8 warning in qv4string
qtdeclarative/src/qml/jsruntime/qv4string.cpp:224:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QChar’ from an array of ‘short unsigned int’ [-Werror=class-memaccess] memcpy(ch, item->text->data(), item->text->size * sizeof(QChar)); Change-Id: Ibbb91fb017fe3cc382e4a4641f899c8ea4ef989a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 27ef77279f0cc563eac58f6ef5ea0f6ac6b570a4) Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r--src/qml/jsruntime/qv4string.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 515d61c8e4..2f30b79050 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -176,7 +176,7 @@ void Heap::String::append(const String *data, QChar *ch)
worklist.push_back(item->right);
worklist.push_back(item->left);
} else {
- memcpy(ch, item->text->data(), item->text->size * sizeof(QChar));
+ memcpy(static_cast<void *>(ch), static_cast<const void *>(item->text->data()), item->text->size * sizeof(QChar));
ch += item->text->size;
}
}