Commit 45e5510c by Ben Clayton

Fix chrome autorollers

Fix warning raised by the compiler being too smart for its own good: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment] Bug: b/153194656 Change-Id: Idca543c13213c6e0bd2d1ff2fdbaa48348f53bf2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43989Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent ac43aa7c
......@@ -46,9 +46,14 @@ TEST(LRUCache, Empty)
LRUCache<std::string, std::string> cache(8);
ASSERT_EQ(cache.lookup(""), "");
ASSERT_EQ(cache.lookup("123"), "");
bool looped = false;
for(auto ignored : cache)
{
(void)ignored;
looped = true;
}
if(looped)
{
FAIL() << "Should not loop on empty cache";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment