Patched to compile with -Werror=declaration-after-statement
authorRyan C. Gordon <icculus@icculus.org>
Wed, 25 Jun 2014 17:13:43 -0400
changeset 8954 7bcc8257809d
parent 8953 dc80dc0bd22e
child 8955 7a74b402790c
Patched to compile with -Werror=declaration-after-statement
src/video/x11/SDL_x11events.c
--- a/src/video/x11/SDL_x11events.c	Wed Jun 25 17:06:12 2014 -0400
+++ b/src/video/x11/SDL_x11events.c	Wed Jun 25 17:13:43 2014 -0400
@@ -389,12 +389,12 @@
     SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;
     SDL_Window* window = data->window;
     Display *display = viddata->display;
+    XEvent evt;
 
     /* !!! FIXME: we need to regrab this if necessary when the drag is done. */
     X11_XUngrabPointer(display, 0L);
     X11_XFlush(display);
 
-    XEvent evt;
     evt.xclient.type = ClientMessage;
     evt.xclient.window = data->xwindow;
     evt.xclient.message_type = X11_XInternAtom(display, "_NET_WM_MOVERESIZE", True);
@@ -415,6 +415,7 @@
     SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;
     SDL_Window* window = data->window;
     Display *display = viddata->display;
+    XEvent evt;
 
     if (direction < _NET_WM_MOVERESIZE_SIZE_TOPLEFT || direction > _NET_WM_MOVERESIZE_SIZE_LEFT)
         return;
@@ -423,7 +424,6 @@
     X11_XUngrabPointer(display, 0L);
     X11_XFlush(display);
 
-    XEvent evt;
     evt.xclient.type = ClientMessage;
     evt.xclient.window = data->xwindow;
     evt.xclient.message_type = X11_XInternAtom(display, "_NET_WM_MOVERESIZE", True);