From 3793a264b6eeecae5d4c44747fbe46c0d255a3c5 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 15:57:38 +0200 Subject: Silence a GCC 8 warning in qv4string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 27ef77279f0cc563eac58f6ef5ea0f6ac6b570a4) Reviewed-by: Ville Voutilainen --- src/qml/jsruntime/qv4string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(ch), static_cast(item->text->data()), item->text->size * sizeof(QChar)); ch += item->text->size; } } -- cgit v1.2.3