[Mesa-dev] [PATCH] nir: fix a couple signed/unsigned comparison warnings in nir_builder.h
Jason Ekstrand
jason at jlekstrand.net
Tue Nov 12 18:03:03 UTC 2019
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Mon, Nov 11, 2019 at 5:45 PM Brian Paul <brianp at vmware.com> wrote:
> ---
> src/compiler/nir/nir_builder.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir/nir_builder.h
> b/src/compiler/nir/nir_builder.h
> index de00fe7..aed4759 100644
> --- a/src/compiler/nir/nir_builder.h
> +++ b/src/compiler/nir/nir_builder.h
> @@ -782,7 +782,7 @@ nir_extract_bits(nir_builder *b, nir_ssa_def **srcs,
> unsigned num_srcs,
> for (unsigned i = 0; i < num_srcs; i++)
> common_bit_size = MIN2(common_bit_size, srcs[i]->bit_size);
> if (first_bit > 0)
> - common_bit_size = MIN2(common_bit_size, (1 << (ffs(first_bit) -
> 1)));
> + common_bit_size = MIN2(common_bit_size, (1u << (ffs(first_bit) -
> 1)));
>
> /* We don't want to have to deal with 1-bit values */
> assert(common_bit_size >= 8);
> @@ -800,7 +800,7 @@ nir_extract_bits(nir_builder *b, nir_ssa_def **srcs,
> unsigned num_srcs,
> const unsigned bit = first_bit + (i * common_bit_size);
> while (bit >= src_end_bit) {
> src_idx++;
> - assert(src_idx < num_srcs);
> + assert(src_idx < (int) num_srcs);
> src_start_bit = src_end_bit;
> src_end_bit += srcs[src_idx]->bit_size *
> srcs[src_idx]->num_components;
> --
> 1.8.5.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20191112/dfb90b1c/attachment.html>
More information about the mesa-dev
mailing list