[Mesa-dev] [PATCH] draw: remove unused 'start' variable in draw_stats_clipper_primitives()

Ian Romanick idr at freedesktop.org
Fri Apr 11 12:53:01 PDT 2014


Looking at the whole function, this seems obviously correct.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 04/11/2014 10:47 AM, Brian Paul wrote:
> It was computed, but never actually used.
> ---
>  src/gallium/auxiliary/draw/draw_context.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
> index da1e958..0a67879 100644
> --- a/src/gallium/auxiliary/draw/draw_context.c
> +++ b/src/gallium/auxiliary/draw/draw_context.c
> @@ -1043,11 +1043,8 @@ draw_stats_clipper_primitives(struct draw_context *draw,
>                                const struct draw_prim_info *prim_info)
>  {
>     if (draw->collect_statistics) {
> -      unsigned start, i;
> -      for (start = i = 0;
> -           i < prim_info->primitive_count;
> -           start += prim_info->primitive_lengths[i], i++)
> -      {
> +      unsigned i;
> +      for (i = 0; i < prim_info->primitive_count; i++) {
>           draw->statistics.c_invocations +=
>              u_decomposed_prims_for_vertices(prim_info->prim,
>                                              prim_info->primitive_lengths[i]);
> 



More information about the mesa-dev mailing list