[Mesa-dev] [PATCH] i965/fs: Fix comparison between signed and unsigned integer expressions

Tapani Pälli tapani.palli at intel.com
Fri Sep 18 04:25:46 PDT 2015


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 09/18/2015 12:05 PM, Iago Toral Quiroga wrote:
> brw_fs_visitor.cpp: In member function 'void fs_visitor::emit_urb_writes()':
> brw_fs_visitor.cpp:977:58: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> ---
>   src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index b85b52b..5bf6449 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -974,9 +974,9 @@ fs_visitor::emit_urb_writes()
>                  sources[length++] = reg;
>               }
>            } else {
> -            for (int i = 0; i < output_components[varying]; i++)
> +            for (unsigned i = 0; i < output_components[varying]; i++)
>                  sources[length++] = offset(this->outputs[varying], bld, i);
> -            for (int i = output_components[varying]; i < 4; i++)
> +            for (unsigned i = output_components[varying]; i < 4; i++)
>                  sources[length++] = fs_reg(0);
>            }
>            break;
>


More information about the mesa-dev mailing list