[PATCH 1/2] xf86Config: Fix warning: declaration of 'Pointer' shadows a global
Hans de Goede
hdegoede at redhat.com
Mon Mar 3 00:53:12 PST 2014
This fixes the following compiler warning:
xf86Config.c: In function 'checkCoreInputDevices':
xf86Config.c:1136:18: warning: declaration of 'Pointer' shadows a global declaration [-Wshadow]
InputInfoPtr Pointer, Keyboard;
^
In file included from xf86Xinput.h:57:0,
from xf86Config.c:66:
/opt/xorg/include/X11/extensions/XIproto.h:88:24: warning: shadowed declaration is here [-Wshadow]
typedef unsigned char *Pointer;
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
hw/xfree86/common/xf86Config.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 542d5ab..b38331b 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1133,7 +1133,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
const char *pointerMsg = NULL, *keyboardMsg = NULL;
InputInfoPtr *devs, /* iterator */
indp;
- InputInfoPtr Pointer, Keyboard;
+ InputInfoPtr pointer, Keyboard;
XF86ConfInputPtr confInput;
XF86ConfInputRec defPtr, defKbd;
MessageType from = X_DEFAULT;
@@ -1239,26 +1239,26 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
/* Add the core pointer device to the layout, and set it to Core. */
if (foundPointer && confInput) {
- Pointer = xf86AllocateInput();
- if (Pointer)
- foundPointer = configInput(Pointer, confInput, from);
+ pointer = xf86AllocateInput();
+ if (pointer)
+ foundPointer = configInput(pointer, confInput, from);
if (foundPointer) {
- Pointer->options = xf86AddNewOption(Pointer->options,
+ pointer->options = xf86AddNewOption(pointer->options,
"CorePointer", "on");
- Pointer->options = xf86AddNewOption(Pointer->options,
+ pointer->options = xf86AddNewOption(pointer->options,
"driver",
confInput->inp_driver);
- Pointer->options =
- xf86AddNewOption(Pointer->options, "identifier",
+ pointer->options =
+ xf86AddNewOption(pointer->options, "identifier",
confInput->inp_identifier);
- servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
+ servlayoutp->inputs = addDevice(servlayoutp->inputs, pointer);
}
}
if (!foundPointer && xf86Info.forceInputDevices) {
/* This shouldn't happen. */
xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
- xf86DeleteInput(Pointer, 0);
+ xf86DeleteInput(pointer, 0);
return FALSE;
}
--
1.9.0
More information about the xorg-devel
mailing list