Re: [Mesa-dev] [PATCH 1/2] draw: fix undefined shift of (1 << 31)
For the series, and the other one (undefined shifts in swrast/draw), Reviewed-by: Roland Scheidegger Am 11.04.19 um 12:32 schrieb Dave Airlie: > From: Dave Airlie > > Pointed out by a coverity scan. > --- > 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; > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] draw: fix undefined shift of (1 << 31)
On Thursday, 2019-04-11 20:32:18 +1000, Dave Airlie wrote: > From: Dave Airlie > > Pointed out by a coverity scan. This patch is: Reviewed-by: Eric Engestrom > --- > 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; > -- > 2.20.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] draw: fix undefined shift of (1 << 31)
From: Dave Airlie Pointed out by a coverity scan. --- 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; -- 2.20.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev