From c3797196074639a290672f061df81d14d936ff5b Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 29 May 2017 13:28:37 +0200 Subject: [PATCH] QTesselator: disable for-loop analysis on Clang Caught by Clang 4: error: variable 'k' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis] But we don't want to change behavior unless we can prove that it's wrong or that there's a way to refactor this without changing it. Change-Id: Iecee112b0cd96bec8d975430a74ca548ee2f470f Reviewed-by: Eirik Aavitsland --- src/plugins/platforms/xcb/nativepainting/qtessellator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp b/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp index 7ffdef54f01..9acb21f95f4 100644 --- a/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp +++ b/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp @@ -755,6 +755,8 @@ void QTessellatorPrivate::cancelCoincidingEdges() std::sort(tl, tl + testListSize); +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wfor-loop-analysis") for (int j = 0; j < testListSize; ++j) { if (tl[j].used) continue; @@ -773,6 +775,7 @@ void QTessellatorPrivate::cancelCoincidingEdges() } ++j; } +QT_WARNING_POP } free(tl); }