[Mesa-dev] [PATCH 1/2] vl: Fix trivial sign compare warnings

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 9 23:08:20 UTC 2016


Hi Jan,

Can I bother you with a couple of related fixes while you're touching
these lines ?

On 9 June 2016 at 23:40, Jan Vesely <jan.vesely at rutgers.edu> wrote:

> @@ -327,7 +327,8 @@ create_stage1_frag_shader(struct vl_idct *idct)
>     struct ureg_dst l[4][2], r[2];
>     struct ureg_dst *fragment;
>
> -   int i, j;
Kill off the empty line between the variables declaration.

> +   unsigned i;
> +   int j;
>
>     shader = ureg_create(PIPE_SHADER_FRAGMENT);
>     if (!shader)


> @@ -583,12 +583,12 @@ init_dct_coeff_table(struct dct_coeff *dst, const struct dct_coeff_compressed *s
>           break;
>        }
>
> -      for(i=0; i<(1 << (17 - coeff.length)); ++i)
> +      for(i=0; i<(1u << (17 - coeff.length)); ++i)
Insert space around = and <.

The above comments apply throughout both patches.

Thank you !
Emil


More information about the mesa-dev mailing list