From 03f338874522170c16a98b827b4306f93188da06 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 12 Aug 2025 14:27:17 +0200 Subject: [PATCH] panoramiX: XineramaGetImageData(): declarare and init `depth` in one shot Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/panoramiX.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 0656d3544e..d43675deca 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -1138,7 +1138,7 @@ XineramaGetImageData(DrawablePtr *pDrawables, { RegionRec SrcRegion, GrabRegion; BoxRec SrcBox; - int size, sizeNeeded, depth; + int size, sizeNeeded; DrawablePtr pDraw = pDrawables[0]; char *ScratchMem = NULL; @@ -1157,7 +1157,7 @@ XineramaGetImageData(DrawablePtr *pDrawables, RegionInit(&SrcRegion, &SrcBox, 1); RegionNull(&GrabRegion); - depth = (format == XYPixmap) ? 1 : pDraw->depth; + int depth = (format == XYPixmap) ? 1 : pDraw->depth; int i; FOR_NSCREENS_BACKWARD(i) {