diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-02-07 16:31:40 +0200 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-02-14 05:43:27 +0000 |
commit | b34942710cf4e40bd9a3091032cb14baed741862 (patch) | |
tree | 7cfffc32806b73f1762ff92b1acace5f621e1342 /src/corelib/tools/qvector.h | |
parent | 3024fd60ae13990e2032bb7ced61c7fbadf50ad8 (diff) |
Silence a GCC 8 warning in QIODevice
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r-- | src/corelib/tools/qvector.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>::iterator QVector<T>::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<void *>(i), static_cast<const void *>(b), (d->size - offset) * sizeof(T)); while (i != b) new (--i) T(copy); } |