]> git.sur5r.net Git - i3/i3/commitdiff
Remove "dereferencing type-punned pointer" warning
authorGuillaume Maudoux <guillaume.maudoux@uclouvain.be>
Mon, 11 Apr 2016 12:50:01 +0000 (14:50 +0200)
committerGuillaume Maudoux <guillaume.maudoux@uclouvain.be>
Mon, 11 Apr 2016 12:50:01 +0000 (14:50 +0200)
Fix the remaining warning discussed in #1538.
This is obviously a false positive from gcc.

src/floating.c

index 65a2810a881a1a0c0bbf414b521e3ece59ec0e92..094d0e8819442133a9a966bf64bf2a329189b249 100644 (file)
@@ -782,16 +782,17 @@ drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_
         .callback = callback,
         .extra = extra,
     };
+    ev_check *check = &loop.check;
     if (con)
         loop.old_rect = con->rect;
-    ev_check_init(&loop.check, xcb_drag_check_cb);
+    ev_check_init(check, xcb_drag_check_cb);
     main_set_x11_cb(false);
-    ev_check_start(main_loop, &loop.check);
+    ev_check_start(main_loop, check);
 
     while (loop.result == DRAGGING)
         ev_run(main_loop, EVRUN_ONCE);
 
-    ev_check_stop(main_loop, &loop.check);
+    ev_check_stop(main_loop, check);
     main_set_x11_cb(true);
 
     xcb_ungrab_keyboard(conn, XCB_CURRENT_TIME);