[PATCH xf86-video-amdgpu 3/3] Move scrn/info declaration inside USE_GLAMOR in amdgpu_dri3_fd_from_pixmap

Alex Deucher alexdeucher at gmail.com
Mon Nov 2 07:23:45 PST 2015


On Mon, Nov 2, 2015 at 4:30 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes warning when building with --disable-glamor:
>
> ../../src/amdgpu_dri3.c: In function 'amdgpu_dri3_fd_from_pixmap':
> ../../src/amdgpu_dri3.c:135:16: warning: unused variable 'info' [-Wunused-variable]
>   AMDGPUInfoPtr info = AMDGPUPTR(scrn);
>                 ^
>
> Reported-by: Jammy Zhou <Jammy.Zhou at amd.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/amdgpu_dri3.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/amdgpu_dri3.c b/src/amdgpu_dri3.c
> index 53871be..73a79ac 100644
> --- a/src/amdgpu_dri3.c
> +++ b/src/amdgpu_dri3.c
> @@ -131,13 +131,13 @@ static int amdgpu_dri3_fd_from_pixmap(ScreenPtr screen,
>                                       CARD16 *stride,
>                                       CARD32 *size)
>  {
> -       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
> -       AMDGPUInfoPtr info = AMDGPUPTR(scrn);
>         struct amdgpu_buffer *bo;
>         struct amdgpu_bo_info bo_info;
>         uint32_t fd;
> -
>  #ifdef USE_GLAMOR
> +       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
> +       AMDGPUInfoPtr info = AMDGPUPTR(scrn);
> +
>         if (info->use_glamor)
>                 return glamor_fd_from_pixmap(screen, pixmap, stride, size);
>  #endif
> --
> 2.6.2
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list