Fix mismatched signedness for a compare in subzero

Clang 9 escalates a warning about an unsigned integer being compared against a signed integer into an error. Fixed by making an integer literal be unsigned. Bug: b/152777669 Change-Id: I38c61ac0837f756c73b8664f7774719a94353fac Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51530Tested-by: 's avatarSean Risser <srisser@google.com> Commit-Queue: Sean Risser <srisser@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 2e89a70e
...@@ -134,7 +134,7 @@ inline void reserveAndResize(Container &V, uint32_t Size, ...@@ -134,7 +134,7 @@ inline void reserveAndResize(Container &V, uint32_t Size,
// Don't call reserve() if Size==0. // Don't call reserve() if Size==0.
if (Size > 0) { if (Size > 0) {
uint32_t Mask; uint32_t Mask;
if (Size <= (1 << ChunkSizeBits)) { if (Size <= (1u << ChunkSizeBits)) {
// For smaller sizes, reserve the smallest power of 2 greater than or // For smaller sizes, reserve the smallest power of 2 greater than or
// equal to Size. // equal to Size.
Mask = Mask =
......
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