From d61f050d7fc46122411af8b4f8bd55045e67ac68 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 Jan 2015 09:34:06 +1000 Subject: [PATCH] touchpad: fix a clang compiler warning Causes the valgrind tests to fail as tp is considered uninitialized. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-tap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index c34b2034..0e37c5ee 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -664,8 +664,9 @@ tp_tap_config_set_enabled(struct libinput_device *device, enum libinput_config_tap_state enabled) { struct evdev_dispatch *dispatch = ((struct evdev_device *) device)->dispatch; - struct tp_dispatch *tp = container_of(dispatch, tp, base); + struct tp_dispatch *tp = NULL; + tp = container_of(dispatch, tp, base); tp_tap_enabled_update(tp, tp->tap.suspended, (enabled == LIBINPUT_CONFIG_TAP_ENABLED), libinput_now(device->seat->libinput));