libwacom: fix warnings building without libwacom

When the libwacom build option is set to false the compiler throws
these warnings:

../udev/libinput-device-group.c:95:1: warning: ‘wacom_handle_ekr’ defined but not used [-Wunused-function]
   95 | wacom_handle_ekr(struct udev_device *device,
      | ^~~~~~~~~~~~~~~~
[205/237] Compiling C object 'libinput-test-suite@exe/test_test-tablet.c.o'.
../test/test-tablet.c:5440:1: warning: ‘verify_left_handed_touch_sequence’ defined but not used [-Wunused-function]
 5440 | verify_left_handed_touch_sequence(struct litest_device *finger,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../test/test-tablet.c:5385:1: warning: ‘verify_left_handed_tablet_sequence’ defined but not used [-Wunused-function]
 5385 | verify_left_handed_tablet_sequence(struct litest_device *tablet,
 #     | ^~~~~~~~~~~~~~~~
 #     | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add the required guards to fix the warnings.

Fix #791.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2022-07-12 19:44:59 +02:00
parent 368b12ad45
commit 71f79b9de1
2 changed files with 3 additions and 1 deletions

View file

@ -5334,6 +5334,7 @@ START_TEST(touch_arbitration_late_touch_lift)
}
END_TEST
#if HAVE_LIBWACOM
static void
verify_left_handed_tablet_motion(struct litest_device *tablet,
struct libinput *li,
@ -5453,6 +5454,7 @@ verify_left_handed_touch_sequence(struct litest_device *finger,
litest_touch_up(finger, 0);
libinput_dispatch(li);
}
#endif
START_TEST(tablet_rotation_left_handed)
{

View file

@ -62,7 +62,6 @@ out:
if (db)
libwacom_database_destroy(db);
}
#endif
static int
find_tree_distance(struct udev_device *a, struct udev_device *b)
@ -148,6 +147,7 @@ wacom_handle_ekr(struct udev_device *device,
udev_enumerate_unref(e);
}
#endif
int main(int argc, char **argv)
{