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 <eirik.aavitsland@qt.io>
This commit is contained in:
parent
ab8ea993b3
commit
c379719607
@ -755,6 +755,8 @@ void QTessellatorPrivate::cancelCoincidingEdges()
|
|||||||
|
|
||||||
std::sort(tl, tl + testListSize);
|
std::sort(tl, tl + testListSize);
|
||||||
|
|
||||||
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_CLANG("-Wfor-loop-analysis")
|
||||||
for (int j = 0; j < testListSize; ++j) {
|
for (int j = 0; j < testListSize; ++j) {
|
||||||
if (tl[j].used)
|
if (tl[j].used)
|
||||||
continue;
|
continue;
|
||||||
@ -773,6 +775,7 @@ void QTessellatorPrivate::cancelCoincidingEdges()
|
|||||||
}
|
}
|
||||||
++j;
|
++j;
|
||||||
}
|
}
|
||||||
|
QT_WARNING_POP
|
||||||
}
|
}
|
||||||
free(tl);
|
free(tl);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user