Fix deconstifying cast warning in xi2_get_type

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@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Alan Coopersmith 2011-12-12 16:49:32 -08:00
parent dd80156bf0
commit 99dfe9b1de

View File

@ -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;
}