[PATCH 09/14] xfree86/configure: Fix -Wshadow warnings

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


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86Config.c    |  4 ++--
 hw/xfree86/common/xf86Configure.c | 16 +++++++---------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index de50ec0..fcc587a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1677,7 +1677,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
  */
 static Bool
 configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
-                    XF86ConfigPtr xf86configptr)
+                    XF86ConfigPtr xf86cfgptr)
 {
     MessageType from;
     XF86ConfScreenPtr s;
@@ -1722,7 +1722,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
 
     memset(&layout, 0, sizeof(layout));
     layout.lay_identifier = servlayoutp->id;
-    if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) {
+    if (xf86layoutAddInputDevices(xf86cfgptr, &layout) > 0) {
         if (!configInputDevices(&layout, servlayoutp))
             return FALSE;
         from = X_DEFAULT;
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 1348b27..e775991 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -206,17 +206,16 @@ configureScreenSection(int screennum)
     ptr->scrn_device_str = tmp;
 
     for (i = 0; i < sizeof(depths) / sizeof(depths[0]); i++) {
-        XF86ConfDisplayPtr display;
+        XF86ConfDisplayPtr dpy;
 
-        display = calloc(1, sizeof(XF86ConfDisplayRec));
-        display->disp_depth = depths[i];
-        display->disp_black.red = display->disp_white.red = -1;
-        display->disp_black.green = display->disp_white.green = -1;
-        display->disp_black.blue = display->disp_white.blue = -1;
+        dpy = calloc(1, sizeof(XF86ConfDisplayRec));
+        dpy->disp_depth = depths[i];
+        dpy->disp_black.red = dpy->disp_white.red = -1;
+        dpy->disp_black.green = dpy->disp_white.green = -1;
+        dpy->disp_black.blue = dpy->disp_white.blue = -1;
         ptr->scrn_display_lst = (XF86ConfDisplayPtr) xf86addListItem((glp) ptr->
                                                                      scrn_display_lst,
-                                                                     (glp)
-                                                                     display);
+                                                                     (glp) dpy);
     }
 
     return ptr;
@@ -375,7 +374,6 @@ configureLayoutSection(void)
             aptr->adj_refscreen = NULL;
         }
         else {
-            char *tmp;
             aptr->adj_where = CONF_ADJ_RIGHTOF;
             XNFasprintf(&tmp, "Screen%d", scrnum - 1);
             aptr->adj_refscreen = tmp;
-- 
1.8.4.2



More information about the xorg-devel mailing list