From fa97850b0f629a3f0fd40f9752718446d4233e7e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 31 Jan 2020 17:49:06 +0200 Subject: [PATCH] Suppress warning inside of qvector.h. --- src/libs/vmisc/compatibility.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/vmisc/compatibility.h b/src/libs/vmisc/compatibility.h index b6a605255..982f3ed91 100644 --- a/src/libs/vmisc/compatibility.h +++ b/src/libs/vmisc/compatibility.h @@ -161,6 +161,9 @@ inline void SwapItemsAt(T &container, int i, int j) template inline void Move(T &vector, int from, int to) { + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wstrict-overflow") + #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) Q_ASSERT_X(from >= 0 && from < vector.size(), "QVector::move(int,int)", "'from' is out-of-range"); Q_ASSERT_X(to >= 0 && to < vector.size(), "QVector::move(int,int)", "'to' is out-of-range"); @@ -174,6 +177,8 @@ inline void Move(T &vector, int from, int to) #else vector.move(from, to); #endif // QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + + QT_WARNING_POP } //---------------------------------------------------------------------------------------------------------------------