[Mesa-dev] [PATCH] glx/dri3: Remove unused deviceName variable

Eric Engestrom eric.engestrom at imgtec.com
Fri Dec 1 13:50:32 UTC 2017


On Friday, 2017-12-01 13:23:02 +0200, vadim.shovkoplias at gmail.com wrote:
> From: Vadym Shovkoplias <vadym.shovkoplias at globallogic.com>
> 
> deviceName string is declared, assigned and freed but actually
> never used in dri3_create_screen() function.
> 
> Fixes: 2d94601582e ("Add DRI3+Present loader")

Indeed, been like this since creation, never changed.
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

and pushed, thanks :)

> 
> Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias at globallogic.com>
> 
> ---
>  src/glx/dri3_glx.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
> index a10306f..f280a8c 100644
> --- a/src/glx/dri3_glx.c
> +++ b/src/glx/dri3_glx.c
> @@ -800,7 +800,7 @@ dri3_create_screen(int screen, struct glx_display * priv)
>     struct dri3_screen *psc;
>     __GLXDRIscreen *psp;
>     struct glx_config *configs = NULL, *visuals = NULL;
> -   char *driverName, *deviceName, *tmp;
> +   char *driverName, *tmp;
>     int i;
>     unsigned char disable;
>  
> @@ -830,7 +830,6 @@ dri3_create_screen(int screen, struct glx_display * priv)
>     }
>  
>     psc->fd = loader_get_user_preferred_fd(psc->fd, &psc->is_different_gpu);
> -   deviceName = NULL;
>  
>     driverName = loader_get_driver_for_fd(psc->fd);
>     if (!driverName) {
> @@ -956,7 +955,6 @@ dri3_create_screen(int screen, struct glx_display * priv)
>        __glXEnableDirectExtension(&psc->base, "GLX_EXT_buffer_age");
>  
>     free(driverName);
> -   free(deviceName);
>  
>     tmp = getenv("LIBGL_SHOW_FPS");
>     psc->show_fps_interval = tmp ? atoi(tmp) : 0;
> @@ -983,7 +981,6 @@ handle_error:
>        dlclose(psc->driver);
>  
>     free(driverName);
> -   free(deviceName);
>     glx_screen_cleanup(&psc->base);
>     free(psc);
>  
> -- 
> 2.7.4
> 


More information about the mesa-dev mailing list