Prevent 'unused variable' warnings when compiled without asserts

This commit is contained in:
Consolatis 2024-02-10 18:02:30 +01:00
parent e9552fb661
commit a5c6b2f83d
4 changed files with 10 additions and 8 deletions

View file

@ -616,6 +616,8 @@ handle_constraint_commit(struct wl_listener *listener, void *data)
{
struct seat *seat = wl_container_of(listener, seat, constraint_commit);
struct wlr_pointer_constraint_v1 *constraint = seat->current_constraint;
/* Prevents unused variable warning when compiled without asserts */
(void)constraint;
assert(constraint->surface = data);
}