From 5a69e234cd4e02186b5b2627360f91cb1fa58edf Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 28 Aug 2022 12:01:13 -0700 Subject: Rename xDepth to xPDepth to quiet -Wshadow warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xrender.c: In function ‘XRenderQueryFormats’: Xrender.c:406:19: warning: declaration of ‘xDepth’ shadows a global declaration [-Wshadow] xPictDepth *xDepth; ^~~~~~ In file included from /net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include/X11/Xlibint.h:43:0, from Xrenderint.h:31, from Xrender.c:28: /net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include/X11/Xproto.h:329:7: note: shadowed declaration is here } xDepth; ^~~~~~ Signed-off-by: Alan Coopersmith --- src/Xrender.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Xrender.c b/src/Xrender.c index 299f9d4..efa29b6 100644 --- a/src/Xrender.c +++ b/src/Xrender.c @@ -403,7 +403,7 @@ XRenderQueryFormats (Display *dpy) XRenderVisual *visual; xPictFormInfo *xFormat; xPictScreen *xScreen; - xPictDepth *xDepth; + xPictDepth *xPDepth; xPictVisual *xVisual; CARD32 *xSubpixel; void *xData; @@ -527,7 +527,7 @@ XRenderQueryFormats (Display *dpy) screen->ndepths = xScreen->nDepth; screen->fallback = _XRenderFindFormat (xri, xScreen->fallback); screen->subpixel = SubPixelUnknown; - xDepth = (xPictDepth *) (xScreen + 1); + xPDepth = (xPictDepth *) (xScreen + 1); if (screen->ndepths > rep.numDepths) { Xfree (xri); Xfree (xData); @@ -539,10 +539,10 @@ XRenderQueryFormats (Display *dpy) rep.numDepths -= screen->ndepths; for (int nd = 0; nd < screen->ndepths; nd++) { - depth->depth = xDepth->depth; - depth->nvisuals = xDepth->nPictVisuals; + depth->depth = xPDepth->depth; + depth->nvisuals = xPDepth->nPictVisuals; depth->visuals = visual; - xVisual = (xPictVisual *) (xDepth + 1); + xVisual = (xPictVisual *) (xPDepth + 1); if (depth->nvisuals > rep.numVisuals) { Xfree (xri); Xfree (xData); @@ -560,10 +560,10 @@ XRenderQueryFormats (Display *dpy) xVisual++; } depth++; - xDepth = (xPictDepth *) xVisual; + xPDepth = (xPictDepth *) xVisual; } screen++; - xScreen = (xPictScreen *) xDepth; + xScreen = (xPictScreen *) xPDepth; } xSubpixel = (CARD32 *) xScreen; screen = xri->screen; -- cgit v1.2.1