draw: fix undefined shift of (1 << 31)
authorDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2019 10:27:01 +0000 (20:27 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2019 22:53:10 +0000 (08:53 +1000)
Pointed out by a coverity scan.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_aapoint.c

index 2b96b8ad446806ebf6b99c06a92ed31978c6f3be..dc22039b127c84a570c6d7dc3de280d50b529495 100644 (file)
@@ -175,7 +175,7 @@ aa_transform_prolog(struct tgsi_transform_context *ctx)
 
    /* find two free temp regs */
    for (i = 0; i < 32; i++) {
-      if ((aactx->tempsUsed & (1 << i)) == 0) {
+      if ((aactx->tempsUsed & (1u << i)) == 0) {
          /* found a free temp */
          if (aactx->tmp0 < 0)
             aactx->tmp0 = i;