[Mesa-dev] [PATCH] draw: Remove unused variables.

Jose Fonseca jfonseca at vmware.com
Mon Jan 16 03:46:19 PST 2012


Hi Vinson,

These lines were added by Dave in 

commit 1865f341d8f45b389061fc08d2da90b7aa8a6099
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jan 6 12:23:00 2012 +0000

    draw: clipdistance support (v2)
    
    Add support for using the clipdistance instead of clip plane.
    
    Passes all piglit clipdistance tests.
    
    v2: fixup some comments from Brian in review.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>


So Dave should take a look, and determine whether this is really dead code, or code is missing.

Jose



----- Original Message -----
> Fix this GCC warning.
> draw_pipe_clip.c: In function ‘interp’:
> draw_pipe_clip.c:122:13: warning: variable ‘clip_dist’ set but not
> used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/gallium/auxiliary/draw/draw_pipe_clip.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c
> b/src/gallium/auxiliary/draw/draw_pipe_clip.c
> index f701972..4da4d65 100644
> --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c
> +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c
> @@ -119,12 +119,8 @@ static void interp( const struct clip_stage
> *clip,
>     const unsigned nr_attrs =
>     draw_current_shader_outputs(clip->stage.draw);
>     const unsigned pos_attr =
>     draw_current_shader_position_output(clip->stage.draw);
>     const unsigned clip_attr =
>     draw_current_shader_clipvertex_output(clip->stage.draw);
> -   unsigned clip_dist[2];
>     unsigned j;
>  
> -   clip_dist[0] =
> draw_current_shader_clipdistance_output(clip->stage.draw, 0);
> -   clip_dist[1] =
> draw_current_shader_clipdistance_output(clip->stage.draw, 1);
> -
>     /* Vertex header.
>      */
>     dst->clipmask = 0;
> --
> 1.7.8.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list