From d84fc4ad119cc49ba1f78f0a3cc5ecec6daa9943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Wed, 23 Nov 2022 18:42:34 +0100 Subject: [PATCH] tablet: fix compiler warning when -Dlibwacom=false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the warning generated: [82/243] Compiling C object libinput.so.10.13.0.p/src_evdev-tablet.c.o ../src/evdev-tablet.c:938:1: warning: unused function 'tool_set_bits_from_libwacom' [-Wunused-function] tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet, ^ When building with Clang v15 and without libwacom: $ CC=clang CXX=clang++ meson builddir -Dlibwacom=false Signed-off-by: José Expósito --- src/evdev-tablet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 68c3c3e4..01a8c1cf 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -934,13 +934,12 @@ copy_button_cap(const struct tablet_dispatch *tablet, set_bit(tool->buttons, button); } +#if HAVE_LIBWACOM static inline int tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet, struct libinput_tablet_tool *tool) { int rc = 1; - -#if HAVE_LIBWACOM WacomDeviceDatabase *db; const WacomStylus *s = NULL; int code; @@ -997,9 +996,10 @@ tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet, copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE); rc = 0; -#endif + return rc; } +#endif static void tool_set_bits(const struct tablet_dispatch *tablet,