mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Prevent 'unused variable' warnings when compiled without asserts
This commit is contained in:
parent
e9552fb661
commit
a5c6b2f83d
4 changed files with 10 additions and 8 deletions
|
|
@ -628,11 +628,15 @@ seat_set_focus_layer(struct seat *seat, struct wlr_layer_surface_v1 *layer)
|
|||
static void
|
||||
pressed_surface_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct wlr_surface *surface = data;
|
||||
struct seat *seat = wl_container_of(listener, seat,
|
||||
pressed_surface_destroy);
|
||||
|
||||
assert(surface == seat->pressed.surface);
|
||||
/*
|
||||
* Using data directly prevents 'unused variable'
|
||||
* warning when compiling without asserts
|
||||
*/
|
||||
assert(data == seat->pressed.surface);
|
||||
|
||||
seat_reset_pressed(seat);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue