[PATCH 13/14] xnest: Fix -Wshadow warnings

Adam Jackson ajax at redhat.com
Fri Dec 13 15:05:51 PST 2013


Just rename parameters to not clash with globals.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xnest/Events.c |  6 +++---
 hw/xnest/GCOps.c  |  4 ++--
 hw/xnest/Init.c   | 22 +++++++++++-----------
 hw/xnest/Window.c |  2 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 447d5a7..3ff095b 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -64,15 +64,15 @@ SetTimeSinceLastInputEvent(void)
 }
 
 static Bool
-xnestExposurePredicate(Display * display, XEvent * event, char *args)
+xnestExposurePredicate(Display * dpy, XEvent * event, char *args)
 {
     return event->type == Expose || event->type == ProcessedExpose;
 }
 
 static Bool
-xnestNotExposurePredicate(Display * display, XEvent * event, char *args)
+xnestNotExposurePredicate(Display * dpy, XEvent * event, char *args)
 {
-    return !xnestExposurePredicate(display, event, args);
+    return !xnestExposurePredicate(dpy, event, args);
 }
 
 void
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index d00511d..0528fde 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -95,7 +95,7 @@ xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
 }
 
 static int
-xnestIgnoreErrorHandler (Display     *display,
+xnestIgnoreErrorHandler (Display     *dpy,
                          XErrorEvent *event)
 {
     return False; /* return value is ignored */
@@ -127,7 +127,7 @@ xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
 }
 
 static Bool
-xnestBitBlitPredicate(Display * display, XEvent * event, char *args)
+xnestBitBlitPredicate(Display * dpy, XEvent * event, char *args)
 {
     return event->type == GraphicsExpose || event->type == NoExpose;
 }
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 330b8ca..39dbe04 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -46,29 +46,29 @@ is" without express or implied warranty.
 Bool xnestDoFullGeneration = True;
 
 void
-InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
+InitOutput(ScreenInfo * screeninfo, int argc, char *argv[])
 {
     int i, j;
 
     xnestOpenDisplay(argc, argv);
 
-    screenInfo->imageByteOrder = ImageByteOrder(xnestDisplay);
-    screenInfo->bitmapScanlineUnit = BitmapUnit(xnestDisplay);
-    screenInfo->bitmapScanlinePad = BitmapPad(xnestDisplay);
-    screenInfo->bitmapBitOrder = BitmapBitOrder(xnestDisplay);
+    screeninfo->imageByteOrder = ImageByteOrder(xnestDisplay);
+    screeninfo->bitmapScanlineUnit = BitmapUnit(xnestDisplay);
+    screeninfo->bitmapScanlinePad = BitmapPad(xnestDisplay);
+    screeninfo->bitmapBitOrder = BitmapBitOrder(xnestDisplay);
 
-    screenInfo->numPixmapFormats = 0;
+    screeninfo->numPixmapFormats = 0;
     for (i = 0; i < xnestNumPixmapFormats; i++)
         for (j = 0; j < xnestNumDepths; j++)
             if ((xnestPixmapFormats[i].depth == 1) ||
                 (xnestPixmapFormats[i].depth == xnestDepths[j])) {
-                screenInfo->formats[screenInfo->numPixmapFormats].depth =
+                screeninfo->formats[screeninfo->numPixmapFormats].depth =
                     xnestPixmapFormats[i].depth;
-                screenInfo->formats[screenInfo->numPixmapFormats].bitsPerPixel =
+                screeninfo->formats[screeninfo->numPixmapFormats].bitsPerPixel =
                     xnestPixmapFormats[i].bits_per_pixel;
-                screenInfo->formats[screenInfo->numPixmapFormats].scanlinePad =
+                screeninfo->formats[screeninfo->numPixmapFormats].scanlinePad =
                     xnestPixmapFormats[i].scanline_pad;
-                screenInfo->numPixmapFormats++;
+                screeninfo->numPixmapFormats++;
                 break;
             }
 
@@ -80,7 +80,7 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
     for (i = 0; i < xnestNumScreens; i++)
         AddScreen(xnestOpenScreen, argc, argv);
 
-    xnestNumScreens = screenInfo->numScreens;
+    xnestNumScreens = screeninfo->numScreens;
 
     xnestDoFullGeneration = xnestFullGeneration;
 }
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index e2b21b5..086f63f 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -380,7 +380,7 @@ xnestClipNotify(WindowPtr pWin, int dx, int dy)
 }
 
 static Bool
-xnestWindowExposurePredicate(Display * display, XEvent * event, XPointer ptr)
+xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr)
 {
     return (event->type == Expose && event->xexpose.window == *(Window *) ptr);
 }
-- 
1.8.4.2



More information about the xorg-devel mailing list