Mesa (master): swrast: 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: 4690f9072828308bae59cfa549490e166fb60192
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4690f9072828308bae59cfa549490e166fb60192
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Apr 11 20:36:03 2019 +1000
swrast: fix undefined shift of 1 << 31
Pointed out by coverity
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
---
src/mesa/swrast/s_span.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index f50b549a97f..184a37c99b8 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -769,7 +769,7 @@ clip_span( struct gl_context *ctx, SWspan *span )
* For arrays of values, shift them left.
*/
for (i = 0; i < VARYING_SLOT_MAX; i++) {
- if (span->interpMask & (1 << i)) {
+ if (span->interpMask & (1u << i)) {
GLuint j;
for (j = 0; j < 4; j++) {
span->attrStart[i][j] += leftClip * span->attrStepX[i][j];
More information about the mesa-commit
mailing list