From 31520b857beab080f48d03937088444bcf7df63e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 6 Feb 2026 17:37:07 +0100 Subject: [PATCH] dri2: declare variables where needed in DRI2Connect() Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/dri2/dri2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Xext/dri2/dri2.c b/Xext/dri2/dri2.c index 3d017d1032..5c451b2525 100644 --- a/Xext/dri2/dri2.c +++ b/Xext/dri2/dri2.c @@ -1287,14 +1287,13 @@ DRI2Connect(ClientPtr client, ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName) { - DRI2ScreenPtr ds; uint32_t prime_id = DRI2DriverPrimeId(driverType); uint32_t driver_id = driverType & 0xffff; if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey)) return FALSE; - ds = DRI2GetScreenPrime(pScreen, prime_id); + DRI2ScreenPtr ds = DRI2GetScreenPrime(pScreen, prime_id); if (ds == NULL) return FALSE;