Mesa (master): draw: fix undefined shift of (1 << 31)
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 11 22:54:28 UTC 2019
Module: Mesa
Branch: master
Commit: e4ed08873bfc3d0f778f768f0bdfd159c709da8e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4ed08873bfc3d0f778f768f0bdfd159c709da8e
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Apr 11 20:27:01 2019 +1000
draw: fix undefined shift of (1 << 31)
Pointed out by a coverity scan.
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
---
src/gallium/auxiliary/draw/draw_pipe_aapoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 2b96b8ad446..dc22039b127 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -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;
More information about the mesa-commit
mailing list