[Mesa-dev] [PATCH] st/glx: Remove unused variables.

Jose Fonseca jfonseca at vmware.com
Sat Feb 18 04:19:25 PST 2012


LGTM.

Jose

----- Original Message -----
> Fixes these GCC warnings.
> glx_api.c: In function ‘choose_visual’:
> glx_api.c:678:8: warning: variable ‘trans_value’ set but not used
> [-Wunused-but-set-variable]
> glx_api.c:677:8: warning: variable ‘trans_type’ set but not used
> [-Wunused-but-set-variable]
> glx_api.c:663:8: warning: variable ‘min_ci’ set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/gallium/state_trackers/glx/xlib/glx_api.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c
> b/src/gallium/state_trackers/glx/xlib/glx_api.c
> index d034fb5..8ad10f1 100644
> --- a/src/gallium/state_trackers/glx/xlib/glx_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
> @@ -660,7 +660,6 @@ choose_visual( Display *dpy, int screen, const
> int *list, GLboolean fbConfig )
>     const GLboolean rgbModeDefault = fbConfig;
>     const int *parselist;
>     XVisualInfo *vis;
> -   int min_ci = 0;
>     int min_red=0, min_green=0, min_blue=0;
>     GLboolean rgb_flag = rgbModeDefault;
>     GLboolean alpha_flag = GL_FALSE;
> @@ -674,8 +673,6 @@ choose_visual( Display *dpy, int screen, const
> int *list, GLboolean fbConfig )
>     GLint accumAlphaSize = 0;
>     int level = 0;
>     int visual_type = DONT_CARE;
> -   int trans_type = DONT_CARE;
> -   int trans_value = DONT_CARE;
>     GLint caveat = DONT_CARE;
>     XMesaVisual xmvis = NULL;
>     int desiredVisualID = -1;
> @@ -700,7 +697,7 @@ choose_visual( Display *dpy, int screen, const
> int *list, GLboolean fbConfig )
>  	    break;
>  	 case GLX_BUFFER_SIZE:
>  	    parselist++;
> -	    min_ci = *parselist++;
> +	    parselist++;
>  	    break;
>  	 case GLX_LEVEL:
>  	    parselist++;
> @@ -805,11 +802,11 @@ choose_visual( Display *dpy, int screen, const
> int *list, GLboolean fbConfig )
>              break;
>           case GLX_TRANSPARENT_TYPE_EXT:
>              parselist++;
> -            trans_type = *parselist++;
> +            parselist++;
>              break;
>           case GLX_TRANSPARENT_INDEX_VALUE_EXT:
>              parselist++;
> -            trans_value = *parselist++;
> +            parselist++;
>              break;
>           case GLX_TRANSPARENT_RED_VALUE_EXT:
>           case GLX_TRANSPARENT_GREEN_VALUE_EXT:
> --
> 1.7.9
> 
> _______________________________________________
> 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