Skip to content

Commit

Permalink
Silence a GCC 8 warning in QIODevice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
villevoutilainen committed Feb 14, 2018
1 parent 3024fd6 commit b349427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/tools/qvector.h
Expand Up @@ -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);
}
Expand Down

0 comments on commit b349427

Please sign in to comment.