Fixed compiler warning.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 11 Jul 2013 12:26:18 -0400
changeset 7402235c9aaeefd1
parent 7401 698995795574
child 7403 9de6ef8865a2
Fixed compiler warning.
src/video/x11/SDL_x11events.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Thu Jul 11 12:17:13 2013 -0400
     1.2 +++ b/src/video/x11/SDL_x11events.c	Thu Jul 11 12:26:18 2013 -0400
     1.3 @@ -187,8 +187,9 @@
     1.4  #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
     1.5  static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
     1.6  {
     1.7 -    if (XGetEventData(videodata->display, &event)) {
     1.8 -        XGenericEventCookie *cookie = &event.xcookie;
     1.9 +    /* event is a union, so cookie == &event, but this is type safe. */
    1.10 +    XGenericEventCookie *cookie = &event.xcookie;
    1.11 +    if (XGetEventData(videodata->display, cookie)) {
    1.12          X11_HandleXinput2Event(videodata, cookie);
    1.13          XFreeEventData(videodata->display, cookie);
    1.14      }