From b34942710cf4e40bd9a3091032cb14baed741862 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 7 Feb 2018 16:31:40 +0200 Subject: Silence a GCC 8 warning in QIODevice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtbase/src/corelib/io/qiodevice.cpp:688:60: required from here ../../../include/QtCore/../../../../qtbase/src/corelib/tools/qvector.h:727:20: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingBuffer’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memmove(i, b, (d->size - offset) * sizeof(T)); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I9dc9a17c281b71bf2eb3e89116600ec3ba345d74 Reviewed-by: Simon Hausmann --- src/corelib/tools/qvector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 74c37faad0..e225ce1ecb 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -724,7 +724,7 @@ typename QVector::iterator QVector::insert(iterator before, size_type n, c } else { T *b = d->begin() + offset; T *i = b + n; - memmove(i, b, (d->size - offset) * sizeof(T)); + memmove(static_cast(i), static_cast(b), (d->size - offset) * sizeof(T)); while (i != b) new (--i) T(copy); } -- cgit v1.2.3