[Mesa-dev] [PATCH] i965: Silence signed-unsigned int comparison warning by compiler

Tapani Pälli tapani.palli at intel.com
Tue Jul 28 22:15:14 PDT 2015


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

On 07/29/2015 02:45 AM, Anuj Phogat wrote:
> brw_cs.cpp:386:27: warning: comparison between signed and unsigned
> integer expressions [-Wsign-compare]
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>   src/mesa/drivers/dri/i965/brw_cs.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_cs.cpp b/src/mesa/drivers/dri/i965/brw_cs.cpp
> index d61bba0..970d153 100644
> --- a/src/mesa/drivers/dri/i965/brw_cs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_cs.cpp
> @@ -383,7 +383,7 @@ brw_upload_cs_state(struct brw_context *brw)
>         brw->gen >= 8 ?
>         SET_FIELD(threads, GEN8_MEDIA_GPGPU_THREAD_COUNT) :
>         SET_FIELD(threads, MEDIA_GPGPU_THREAD_COUNT);
> -   assert(threads <= brw->max_cs_threads);
> +   assert(threads <= (unsigned) brw->max_cs_threads);
>      desc[dw++] = media_threads;
>
>      BEGIN_BATCH(4);
>


More information about the mesa-dev mailing list