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:
parent
dd80156bf0
commit
99dfe9b1de
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue