mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 12:49:21 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user