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

@ -1411,6 +1411,8 @@ post_processing(void)
if (!libinput_category_get_default()) {
/* So we still allow tap to click by default */
struct libinput_category *l = libinput_category_create();
/* Prevents unused variable warning when compiled without asserts */
(void)l;
assert(l && libinput_category_get_default() == l);
}