summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-12 21:11:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-02-10 18:14:44 -0800
commitbd563fd48f909094d6660854e97811ad7e676ddf (patch)
treefef41bf41b8e539fee24fe5f39232bb04c6927e5
parent57e08fae82f733304200a473f55b86e689404c13 (diff)
dmx: more unshadowing of variables
Gets rid of gcc 4.8 warnings: dmxinputinit.c: In function ‘dmxInputScanForExtensions’: dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow] Display *display; ^ In file included from ../../../include/windowstr.h:60:0, from dmxinputinit.c:72: ../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow] extern _X_EXPORT const char *display; ^ glxcmds.c: In function ‘__glXCreatePbuffer’: glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow] CARD32 *pc = (CARD32 *) (be_req + 1); ^ glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow] __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc) ^ glxscreens.c: In function ‘CalcServerVersionAndExtensions’: glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow] xGLXQueryServerStringReq *req; ^ glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReq *req; ^ glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow] xGLXQueryServerStringReply reply; ^ glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReply reply; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/dmx/glxProxy/glxcmds.c6
-rw-r--r--hw/dmx/glxProxy/glxscreens.c4
-rw-r--r--hw/dmx/input/dmxinputinit.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index fb4d5acce..88c2eb15b 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3394,11 +3394,11 @@ __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
/* Send attributes */
if (attr != NULL) {
- CARD32 *pc = (CARD32 *) (be_req + 1);
+ CARD32 *pca = (CARD32 *) (be_req + 1);
while (numAttribs-- > 0) {
- *pc++ = *attr++; /* token */
- *pc++ = *attr++; /* value */
+ *pca++ = *attr++; /* token */
+ *pca++ = *attr++; /* value */
}
}
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index 138afedf2..b62776c41 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -65,8 +65,6 @@ static void
CalcServerVersionAndExtensions(void)
{
int s;
- xGLXQueryVersionReq *req;
- xGLXQueryVersionReply reply;
char **be_extensions;
char *ext;
char *denied_extensions;
@@ -80,6 +78,8 @@ CalcServerVersionAndExtensions(void)
for (s = 0; s < __glXNumActiveScreens; s++) {
DMXScreenInfo *dmxScreen = &dmxScreens[s];
Display *dpy = dmxScreen->beDisplay;
+ xGLXQueryVersionReq *req;
+ xGLXQueryVersionReply reply;
/* Send the glXQueryVersion request */
LockDisplay(dpy);
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index abb6a8551..56a39df8c 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -874,17 +874,17 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
{
XExtensionVersion *ext;
XDeviceInfo *devices;
- Display *display;
+ Display *dsp;
int num;
int i, j;
XextErrorHandler handler;
- if (!(display = XOpenDisplay(dmxInput->name)))
+ if (!(dsp = XOpenDisplay(dmxInput->name)))
return;
/* Print out information about the XInput Extension. */
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
- ext = XGetExtensionVersion(display, INAME);
+ ext = XGetExtensionVersion(dsp, INAME);
XSetExtensionErrorHandler(handler);
if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
@@ -894,7 +894,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
dmxInput->name, INAME,
ext->major_version, ext->minor_version);
- devices = XListInputDevices(display, &num);
+ devices = XListInputDevices(dsp, &num);
XFree(ext);
ext = NULL;
@@ -956,7 +956,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
}
XFreeDeviceList(devices);
}
- XCloseDisplay(display);
+ XCloseDisplay(dsp);
}
/** Re-initialize all the devices described in \a dmxInput. Called from