From 137a338bbddc51f48850709e0193c4fcde342fcb Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 11 Jul 2013 12:26:18 -0400 Subject: [PATCH] Fixed compiler warning. --- src/video/x11/SDL_x11events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 7fb99818c..398b25f60 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -187,8 +187,9 @@ static char* X11_URIToLocal(char* uri) { #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event) { - if (XGetEventData(videodata->display, &event)) { - XGenericEventCookie *cookie = &event.xcookie; + /* event is a union, so cookie == &event, but this is type safe. */ + XGenericEventCookie *cookie = &event.xcookie; + if (XGetEventData(videodata->display, cookie)) { X11_HandleXinput2Event(videodata, cookie); XFreeEventData(videodata->display, cookie); }