aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmldebug
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 17:04:24 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 16:11:34 +0000
commitcc71df112772ac5552ca5a698a837f3bbaeddc2a (patch)
treebab791f8166e37c39cd66c36bd20fd268a985f47 /src/qmldebug
parent55f71cdfc5746a71bcb89f0fa4ff3447cb8b5514 (diff)
Silence a GCC 8 warning in qqmlprofilerevent
qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h:100:55: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct QQmlProfilerEvent’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memcpy(this, &other, sizeof(QQmlProfilerEvent)); Change-Id: I72a03da54784ba3dcd89def5ae44c1ae26a68e53 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qmldebug')
-rw-r--r--src/qmldebug/qqmlprofilerevent_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h
index 93562302e9..49a0c9e347 100644
--- a/src/qmldebug/qqmlprofilerevent_p.h
+++ b/src/qmldebug/qqmlprofilerevent_p.h
@@ -97,7 +97,7 @@ struct QQmlProfilerEvent : public QQmlProfilerDefinitions {
QQmlProfilerEvent(QQmlProfilerEvent &&other)
{
- memcpy(this, &other, sizeof(QQmlProfilerEvent));
+ memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(QQmlProfilerEvent));
other.m_dataType = Inline8Bit; // prevent dtor from deleting the pointer
}
@@ -117,7 +117,7 @@ struct QQmlProfilerEvent : public QQmlProfilerDefinitions {
QQmlProfilerEvent &operator=(QQmlProfilerEvent &&other)
{
if (this != &other) {
- memcpy(this, &other, sizeof(QQmlProfilerEvent));
+ memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(QQmlProfilerEvent));
other.m_dataType = Inline8Bit;
}
return *this;