diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-11-28 20:13:55 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-02 14:58:10 +0100 |
commit | cd407e1bc616bb98eef83d2b5c64513507ed1ef5 (patch) | |
tree | 93b7de895620ae7c2867b87a2b6d3a9bef7ffe26 /src/testlib | |
parent | 26b0ff7bad4c78edf4845fa4bf416bc17502da13 (diff) |
Fix undefined behavior found by GCC 5
GCC said:
qtldurl.cpp:51:50: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations]
qtldurl.cpp:51:48: note: possible undefined statement is here
while (tldIndices[index] >= tldChunks[chunk] && chunk < tldChunkCount) {
^
That's because we check whether chunk is still valid (less than
tldChunkCount) after we've dereferenced tldChunks[chunk]. That is, we've
already read tldChunk[2].
Change-Id: I79b6a1ea9a2454813d6cce7596fc2bb6d972d097
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/testlib')
0 files changed, 0 insertions, 0 deletions