[PATCH 02/25] Fix deconstifying cast warning in xi2_get_type
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Dec 11 10:16:15 PST 2011
Since we're just comparing values in the struct, cast it to a
const xGenericEvent * to clear gcc warning of:
events.c: In function 'xi2_get_type':
events.c:193:5: warning: cast discards qualifiers from pointer target type
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
dix/events.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 59caa91..5c0f9dd 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -190,7 +190,7 @@ core_get_type(const xEvent *event)
static inline int
xi2_get_type(const xEvent *event)
{
- xGenericEvent* e = (xGenericEvent*)event;
+ const xGenericEvent* e = (const xGenericEvent*)event;
return (e->type != GenericEvent || e->extension != IReqCode) ? 0 : e->evtype;
}
--
1.7.3.2
More information about the xorg-devel
mailing list