From 49553049e871d03e9e26672843de8712d20f688a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 10 Feb 2020 18:57:42 +0100 Subject: [PATCH] modesetting: Remove local variable only used with glamor enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resulted in a build failure with -Werror: ../hw/xfree86/drivers/modesetting/drmmode_display.c: In function ‘drmmode_crtc_set_mode’: ../hw/xfree86/drivers/modesetting/drmmode_display.c:759:15: error: unused variable ‘screen’ [-Werror=unused-variable] 759 | ScreenPtr screen = crtc->scrn->pScreen; | ^~~~~~ Fixes: c66c548eabf0 "modesetting: Call glamor_finish from drmmode_crtc_set_mode" Reviewed-by: Adam Jackson --- hw/xfree86/drivers/modesetting/drmmode_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index c5ef91e05..27ad75049 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -756,7 +756,6 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; - ScreenPtr screen = crtc->scrn->pScreen; drmModeModeInfo kmode; int output_count = 0; uint32_t *output_ids = NULL; @@ -770,7 +769,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) #ifdef GLAMOR_HAS_GBM /* Make sure any pending drawing will be visible in a new scanout buffer */ if (drmmode->glamor) - glamor_finish(screen); + glamor_finish(crtc->scrn->pScreen); #endif if (ms->atomic_modeset) {