[Mesa-dev] [PATCH] nir: fix a few signed/unsigned comparison warnings
Jason Ekstrand
jason at jlekstrand.net
Fri Mar 22 03:02:39 UTC 2019
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Thu, Mar 21, 2019 at 8:20 PM Brian Paul <brianp at vmware.com> wrote:
> ---
> src/compiler/nir_types.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
> index aff575c..3bf93c5 100644
> --- a/src/compiler/nir_types.cpp
> +++ b/src/compiler/nir_types.cpp
> @@ -690,7 +690,7 @@ glsl_type_get_sampler_count(const struct glsl_type
> *type)
>
> if (glsl_type_is_struct_or_ifc(type)) {
> unsigned count = 0;
> - for (int i = 0; i < glsl_get_length(type); i++)
> + for (unsigned i = 0; i < glsl_get_length(type); i++)
> count += glsl_type_get_sampler_count(glsl_get_struct_field(type,
> i));
> return count;
> }
> @@ -711,7 +711,7 @@ glsl_type_get_image_count(const struct glsl_type *type)
>
> if (glsl_type_is_struct_or_ifc(type)) {
> unsigned count = 0;
> - for (int i = 0; i < glsl_get_length(type); i++)
> + for (unsigned i = 0; i < glsl_get_length(type); i++)
> count += glsl_type_get_image_count(glsl_get_struct_field(type,
> i));
> return count;
> }
> --
> 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/20190321/b71c2d6e/attachment.html>
More information about the mesa-dev
mailing list