[PATCH 3/3] Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Dec 17 20:50:03 PST 2014
dtrace generates these as taking non const arguments, so cast away
the constness of the pointers when calling them.
Gets rid of these warnings from gcc 4.8:
getevents.c:1096:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' discards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1096:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1651:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1651:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1791:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1791:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1921:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1921:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
dix/getevents.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index dd96265..cc3e428 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1095,8 +1095,8 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0,
mask_in ? mask_in->last_bit + 1 : 0,
- mask_in ? mask_in->mask : NULL,
- mask_in ? mask_in->valuators : NULL);
+ mask_in ? (uint8_t *) mask_in->mask : NULL,
+ mask_in ? (double *) mask_in->valuators : NULL);
}
#endif
@@ -1650,8 +1650,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, buttons, flags,
mask_in ? mask_in->last_bit + 1 : 0,
- mask_in ? mask_in->mask : NULL,
- mask_in ? mask_in->valuators : NULL);
+ mask_in ? (uint8_t *) mask_in->mask : NULL,
+ mask_in ? (double *) mask_in->valuators : NULL);
}
#endif
@@ -1790,8 +1790,8 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, 0, 0,
mask_in ? mask_in->last_bit + 1 : 0,
- mask_in ? mask_in->mask : NULL,
- mask_in ? mask_in->valuators : NULL);
+ mask_in ? (uint8_t *) mask_in->mask : NULL,
+ mask_in ? (double *) mask_in->valuators : NULL);
}
#endif
@@ -1920,8 +1920,8 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(dev->id, type, ddx_touchid, flags,
mask_in ? mask_in->last_bit + 1 : 0,
- mask_in ? mask_in->mask : NULL,
- mask_in ? mask_in->valuators : NULL);
+ mask_in ? (uint8_t *) mask_in->mask : NULL,
+ mask_in ? (double *) mask_in->valuators : NULL);
}
#endif
--
1.7.9.2
More information about the xorg-devel
mailing list