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>
This commit is contained in:
parent
57e08fae82
commit
bd563fd48f
|
@ -3394,11 +3394,11 @@ __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
|
||||||
|
|
||||||
/* Send attributes */
|
/* Send attributes */
|
||||||
if (attr != NULL) {
|
if (attr != NULL) {
|
||||||
CARD32 *pc = (CARD32 *) (be_req + 1);
|
CARD32 *pca = (CARD32 *) (be_req + 1);
|
||||||
|
|
||||||
while (numAttribs-- > 0) {
|
while (numAttribs-- > 0) {
|
||||||
*pc++ = *attr++; /* token */
|
*pca++ = *attr++; /* token */
|
||||||
*pc++ = *attr++; /* value */
|
*pca++ = *attr++; /* value */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ static void
|
||||||
CalcServerVersionAndExtensions(void)
|
CalcServerVersionAndExtensions(void)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
xGLXQueryVersionReq *req;
|
|
||||||
xGLXQueryVersionReply reply;
|
|
||||||
char **be_extensions;
|
char **be_extensions;
|
||||||
char *ext;
|
char *ext;
|
||||||
char *denied_extensions;
|
char *denied_extensions;
|
||||||
|
@ -80,6 +78,8 @@ CalcServerVersionAndExtensions(void)
|
||||||
for (s = 0; s < __glXNumActiveScreens; s++) {
|
for (s = 0; s < __glXNumActiveScreens; s++) {
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[s];
|
DMXScreenInfo *dmxScreen = &dmxScreens[s];
|
||||||
Display *dpy = dmxScreen->beDisplay;
|
Display *dpy = dmxScreen->beDisplay;
|
||||||
|
xGLXQueryVersionReq *req;
|
||||||
|
xGLXQueryVersionReply reply;
|
||||||
|
|
||||||
/* Send the glXQueryVersion request */
|
/* Send the glXQueryVersion request */
|
||||||
LockDisplay(dpy);
|
LockDisplay(dpy);
|
||||||
|
|
|
@ -874,17 +874,17 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
|
||||||
{
|
{
|
||||||
XExtensionVersion *ext;
|
XExtensionVersion *ext;
|
||||||
XDeviceInfo *devices;
|
XDeviceInfo *devices;
|
||||||
Display *display;
|
Display *dsp;
|
||||||
int num;
|
int num;
|
||||||
int i, j;
|
int i, j;
|
||||||
XextErrorHandler handler;
|
XextErrorHandler handler;
|
||||||
|
|
||||||
if (!(display = XOpenDisplay(dmxInput->name)))
|
if (!(dsp = XOpenDisplay(dmxInput->name)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Print out information about the XInput Extension. */
|
/* Print out information about the XInput Extension. */
|
||||||
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
|
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
|
||||||
ext = XGetExtensionVersion(display, INAME);
|
ext = XGetExtensionVersion(dsp, INAME);
|
||||||
XSetExtensionErrorHandler(handler);
|
XSetExtensionErrorHandler(handler);
|
||||||
|
|
||||||
if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
|
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",
|
dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
|
||||||
dmxInput->name, INAME,
|
dmxInput->name, INAME,
|
||||||
ext->major_version, ext->minor_version);
|
ext->major_version, ext->minor_version);
|
||||||
devices = XListInputDevices(display, &num);
|
devices = XListInputDevices(dsp, &num);
|
||||||
|
|
||||||
XFree(ext);
|
XFree(ext);
|
||||||
ext = NULL;
|
ext = NULL;
|
||||||
|
@ -956,7 +956,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
|
||||||
}
|
}
|
||||||
XFreeDeviceList(devices);
|
XFreeDeviceList(devices);
|
||||||
}
|
}
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(dsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Re-initialize all the devices described in \a dmxInput. Called from
|
/** Re-initialize all the devices described in \a dmxInput. Called from
|
||||||
|
|
Loading…
Reference in New Issue